From 17c80c0c7f3d716576afd0054904e20389166071 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 20 Oct 2019 18:11:29 +0200 Subject: [PATCH] Put all conf in easy to change consts --- main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 22f9ca2..cba5a0c 100644 --- a/main.go +++ b/main.go @@ -13,13 +13,15 @@ import ( func main() { const listID = 19 + const basePath = `http://localhost:8080/api/v1` + const filepath = `../api/Featurecreep.md` now := time.Now() client := sdk.NewAPIClient(&sdk.Configuration{ - BasePath: "http://localhost:8080/api/v1", + BasePath: basePath, DefaultHeader: make(map[string]string), - UserAgent: "Go client", + UserAgent: "Go migration client", }) token, _, err := client.UserApi.LoginPost(context.Background(), sdk.ModelsUserLogin{ @@ -37,7 +39,7 @@ func main() { }) // Read the md file - lines, err := scanLines("../api/Featurecreep.md") + lines, err := scanLines(filepath) if err != nil { log.Fatal("Error reading file: ", err) }