diff --git a/samples/tokens/endorser/main.go b/samples/tokens/endorser/main.go index 0c14379..ea8c480 100644 --- a/samples/tokens/endorser/main.go +++ b/samples/tokens/endorser/main.go @@ -25,7 +25,10 @@ import ( func main() { // Flags - cwd, _ := os.Getwd() + cwd, err := os.Getwd() + if err != nil { + log.Fatal(err) + } pth := flag.String("conf", cwd, "the directory that contains the core.yaml configuration file") port := flag.String("port", "9000", "the API port for the application") flag.Parse() diff --git a/samples/tokens/issuer/main.go b/samples/tokens/issuer/main.go index 6d26976..9fad2b9 100644 --- a/samples/tokens/issuer/main.go +++ b/samples/tokens/issuer/main.go @@ -29,7 +29,10 @@ import ( func main() { // Flags - cwd, _ := os.Getwd() + cwd, err := os.Getwd() + if err != nil { + log.Fatal(err) + } pth := flag.String("conf", cwd, "the directory that contains the core.yaml configuration file") port := flag.String("port", "9000", "the API port for the application") flag.Parse() diff --git a/samples/tokens/owner/main.go b/samples/tokens/owner/main.go index f60a07c..18a1a82 100644 --- a/samples/tokens/owner/main.go +++ b/samples/tokens/owner/main.go @@ -28,7 +28,10 @@ import ( ) func main() { - cwd, _ := os.Getwd() + cwd, err := os.Getwd() + if err != nil { + log.Fatal(err) + } pth := flag.String("conf", cwd, "the directory that contains the core.yaml configuration file") port := flag.String("port", "9000", "the API port for the application") flag.Parse()