fix typos in example fmt.Printf

This commit is contained in:
AJ ONeal 2020-09-12 08:57:44 +00:00
parent a45a154eaf
commit 37c1fd4b56
1 changed files with 3 additions and 1 deletions

View File

@ -18,6 +18,8 @@ Goals:
1. You define the fallback version and version printing in `main.go`: 1. You define the fallback version and version printing in `main.go`:
``` ```
//go:generate go run git.rootprojects.org/root/go-gitver
package main package main
var ( var (
@ -28,7 +30,7 @@ var (
func main() { func main() {
if (len(os.Args) > 1 && "version" === os.Args[1]) { if (len(os.Args) > 1 && "version" === os.Args[1]) {
fmt.Printf("Foobar v%s (%s)", GitVersion, GitTimestamp) fmt.Printf("Foobar %s (%s)\n", GitVersion, GitTimestamp)
} }
// ... // ...
} }