func parseFlags() {
	if _, parseError := kingpin.CommandLine.Parse(args); parseError != nil {
		panic(parseError)
	}
}
checking for valid flags. At this point not checking for valid args provided with flags
package main
import (
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	puppy "github.com/anz-bank/go-course/09_json/nickolee/pkg/puppy"
	store "github.com/anz-bank/go-course/09_json/nickolee/pkg/puppy/store"
	"gopkg.in/alecthomas/kingpin.v2"
)
var out io.Writer = os.Stdout
var (
	args     = os.Args[1:]
	fileName = kingpin.Flag("data", "This flag supplies a puppy JSON file name").Short('d').ExistingFile()
)
func main() {
	parseFlags()
	fileData := LoadFile()  
	puppies := unmarshalPuppies(fileData)
	store := store.NewMapStore()
	for _, pup := range puppies {
		pup := pup  
		createdPuppy, _ := store.CreatePuppy(&pup)
		fmt.Fprintf(out, "Puppy with ID %d has been created\n", createdPuppy)
		retrievedPuppy, _ := store.ReadPuppy(createdPuppy)
		fmt.Fprintln(out, "Retrieved puppy:", retrievedPuppy)
	}
}