"log"
"os"
- "go.cypherpunks.ru/nncp/v5"
+ "go.cypherpunks.ru/nncp/v7"
)
func usage() {
func main() {
var (
+ useTmp = flag.Bool("use-tmp", false, "Use temporary file, instead of memory buffer")
+ noCompress = flag.Bool("nocompress", false, "Do not compress input data")
cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceExec), "Outbound packet niceness")
replyNiceRaw = flag.String("replynice", nncp.NicenessFmt(nncp.DefaultNiceFile), "Possible reply packet niceness")
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
)
+ log.SetFlags(log.Lshortfile)
flag.Usage = usage
flag.Parse()
if *warranty {
flag.Args()[2:],
bufio.NewReader(os.Stdin),
int64(*minSize)*1024,
+ *useTmp,
+ *noCompress,
); err != nil {
log.Fatalln(err)
}