Put all conf in easy to change consts

This commit is contained in:
kolaente 2019-10-20 18:11:29 +02:00
parent 98643dd6f1
commit 17c80c0c7f
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 3 deletions

View File

@ -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)
}