This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- fmt.Fprintf(os.Stderr, nncp.UsageHeader())
- fmt.Fprintf(os.Stderr, "nncp-rm -- remove packet\n\n")
+ fmt.Fprint(os.Stderr, "nncp-rm -- remove packet\n\n")
fmt.Fprintf(os.Stderr, "Usage: %s [options] [-older X] -tmp\n", os.Args[0])
fmt.Fprintf(os.Stderr, " %s [options] -lock\n", os.Args[0])
fmt.Fprintf(os.Stderr, " %s [options] [-older X] {-all|-node NODE} -part\n", os.Args[0])
fmt.Fprintf(os.Stderr, "Usage: %s [options] [-older X] -tmp\n", os.Args[0])
fmt.Fprintf(os.Stderr, " %s [options] -lock\n", os.Args[0])
fmt.Fprintf(os.Stderr, " %s [options] [-older X] {-all|-node NODE} -part\n", os.Args[0])
}
remove := func(xx nncp.TRxTx) error {
p := filepath.Join(ctx.Spool, node.Id.String(), string(xx))
}
remove := func(xx nncp.TRxTx) error {
p := filepath.Join(ctx.Spool, node.Id.String(), string(xx))
- ctx.LogD("rm-skip", nncp.LEs{{K: "File", V: pth}}, func(les nncp.LEs) string {
- return fmt.Sprintf("File %s: too fresh, skipping", pth)
- })
+ ctx.LogD("rm-skip", nncp.LEs{{K: "File", V: pth}},
+ func(les nncp.LEs) string {
+ return fmt.Sprintf("File %s: too fresh, skipping", pth)
+ },
+ )
- return filepath.Walk(p, func(path string, info os.FileInfo, err error) error {
+ return filepath.Walk(p, func(
+ path string, info os.FileInfo, err error,
+ ) error {
filepath.Join(ctx.Spool, node.Id.String(), nncp.AreaDir),
func(path string, info os.FileInfo, err error) error {
if err != nil {
filepath.Join(ctx.Spool, node.Id.String(), nncp.AreaDir),
func(path string, info os.FileInfo, err error) error {
if err != nil {