From a4cf79125f07d867c9448d28b1a5cbe4932ff79c Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 29 Nov 2017 23:30:25 +0300 Subject: [PATCH] Suffix is a better term --- src/cypherpunks.ru/nncp/cmd/nncp-bundle/main.go | 2 +- src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go | 2 +- src/cypherpunks.ru/nncp/toss.go | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cypherpunks.ru/nncp/cmd/nncp-bundle/main.go b/src/cypherpunks.ru/nncp/cmd/nncp-bundle/main.go index 163feb4..e79f9e1 100644 --- a/src/cypherpunks.ru/nncp/cmd/nncp-bundle/main.go +++ b/src/cypherpunks.ru/nncp/cmd/nncp-bundle/main.go @@ -279,7 +279,7 @@ func main() { ctx.LogD("nncp-bundle", sds, "Packet already exists") continue } - if _, err = os.Stat(dstPath + nncp.SeenPostfix); err == nil || !os.IsNotExist(err) { + if _, err = os.Stat(dstPath + nncp.SeenSuffix); err == nil || !os.IsNotExist(err) { ctx.LogD("nncp-bundle", sds, "Packet already exists") continue } diff --git a/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go b/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go index f500cc9..ffd1c0c 100644 --- a/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go +++ b/src/cypherpunks.ru/nncp/cmd/nncp-xfer/main.go @@ -286,7 +286,7 @@ Tx: job.Fd.Close() continue } - if _, err = os.Stat(filepath.Join(dstPath, pktName+nncp.SeenPostfix)); err == nil || !os.IsNotExist(err) { + if _, err = os.Stat(filepath.Join(dstPath, pktName+nncp.SeenSuffix)); err == nil || !os.IsNotExist(err) { ctx.LogD("nncp-xfer", sds, "already exists") job.Fd.Close() continue diff --git a/src/cypherpunks.ru/nncp/toss.go b/src/cypherpunks.ru/nncp/toss.go index a1fa8f3..7777ecd 100644 --- a/src/cypherpunks.ru/nncp/toss.go +++ b/src/cypherpunks.ru/nncp/toss.go @@ -39,7 +39,7 @@ import ( ) const ( - SeenPostfix = ".seen" + SeenSuffix = ".seen" ) func newNotification(fromTo *FromToYAML, subject string) io.Reader { @@ -128,7 +128,7 @@ func (ctx *Ctx) Toss(nodeId *NodeId, nice uint8, dryRun, doSeen bool) bool { ctx.LogI("rx", sds, "") if !dryRun { if doSeen { - if fd, err := os.Create(job.Fd.Name() + SeenPostfix); err == nil { + if fd, err := os.Create(job.Fd.Name() + SeenSuffix); err == nil { fd.Close() } } @@ -199,7 +199,7 @@ func (ctx *Ctx) Toss(nodeId *NodeId, nice uint8, dryRun, doSeen bool) bool { ctx.LogI("rx", sds, "") if !dryRun { if doSeen { - if fd, err := os.Create(job.Fd.Name() + SeenPostfix); err == nil { + if fd, err := os.Create(job.Fd.Name() + SeenSuffix); err == nil { fd.Close() } } @@ -273,7 +273,7 @@ func (ctx *Ctx) Toss(nodeId *NodeId, nice uint8, dryRun, doSeen bool) bool { ctx.LogI("rx", sds, "") if !dryRun { if doSeen { - if fd, err := os.Create(job.Fd.Name() + SeenPostfix); err == nil { + if fd, err := os.Create(job.Fd.Name() + SeenSuffix); err == nil { fd.Close() } } @@ -317,7 +317,7 @@ func (ctx *Ctx) Toss(nodeId *NodeId, nice uint8, dryRun, doSeen bool) bool { ctx.LogI("rx", sds, "") if !dryRun { if doSeen { - if fd, err := os.Create(job.Fd.Name() + SeenPostfix); err == nil { + if fd, err := os.Create(job.Fd.Name() + SeenSuffix); err == nil { fd.Close() } } -- 2.48.1