Skip to content

Commit 74c90b9

Browse files
authored
Merge pull request #20 from ToshihitoKon/feature/snippets-timestamp-ms
postFile name add millisec
2 parents 78ad083 + 6b1de3d commit 74c90b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,9 @@ func postBlocks(client SlackClient, postOpts *PostOptions, blocks slack.Blocks)
308308
}
309309

310310
func postFile(client SlackClient, postOpts *PostOptions, fileReader io.Reader, filename, comment string) (*CliOutput, error) {
311+
postTime := time.Now()
311312
if filename == "" {
312-
filename = fmt.Sprintf("%s.txt", time.Now().Format("20060102_150405"))
313+
filename = fmt.Sprintf("%s.txt", postTime.Format("20060102_150405.999999"))
313314
}
314315
fups := slack.FileUploadParameters{
315316
Filename: filename,

0 commit comments

Comments
 (0)