Powerful Command-Line Applications in Go: Missing .todo.json location 1453 ebook

When creating the first cli client for the Todo api,the working file is hardcoded as “.todo.json”. In the main_test.go users are never instructed to created the file but they are instructed to remove the file with os.Remove(fileName). Even if a person were to manually make the file they would have to do so everytime because their test will delete it.

You should instruct users to create the file at the beginning of the tests like when testing the API alone otherwise users will get a non-descriptive error that their test failed unless they build and run it manually at which point it will say “open .todo.json: no such file or directory”

@rgerardi