Skip to content

Commit

Permalink
add: basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KarolosLykos committed Jan 18, 2022
1 parent 2fec4af commit e3f332e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/date.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var DateCmd = &cobra.Command{
Short: "Print the current date.",
Run: func(cmd *cobra.Command, args []string) {
format, _ := cmd.Flags().GetString("format")
fmt.Fprintf(cmd.OutOrStdout(), time.Now().Format(format))
fmt.Fprint(cmd.OutOrStdout(), time.Now().Format(format))
},
}

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import (
)

func main() {
cmd.Execute()
_ = cmd.Execute()
}

0 comments on commit e3f332e

Please sign in to comment.