output file: missing '-' before timestamp
This commit is contained in:
parent
7a262573d3
commit
0f22ab3e39
2
TDL.go
2
TDL.go
|
@ -30,7 +30,7 @@ func outfile(infile string) io.Writer {
|
||||||
basename := path.Base(infile)
|
basename := path.Base(infile)
|
||||||
extension := path.Ext(basename)
|
extension := path.Ext(basename)
|
||||||
basename = strings.TrimSuffix(basename, extension)
|
basename = strings.TrimSuffix(basename, extension)
|
||||||
name := basename + time.Now().Format(STAMP_FORMAT) + ".txt"
|
name := basename + "-" + time.Now().Format(STAMP_FORMAT) + ".txt"
|
||||||
f, err := os.OpenFile(name, os.O_CREATE|os.O_WRONLY, 0644)
|
f, err := os.OpenFile(name, os.O_CREATE|os.O_WRONLY, 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, err)
|
fmt.Fprintln(os.Stderr, err)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user