Skip to content

Add option to pass URLs (dacat etc) #121

@minottic

Description

@minottic

We will need to test the CLI with v3 and v4 in parallel, so having a way to pass vars could be handy. Something as easy as this, maybe, but I leave it up to you to decide how. It could also be a command line argument otherwise

func getEnv(key, fallback string) string {
    if value, ok := os.LookupEnv(key); ok {
        return value
    }
    return fallback
}

const MANUAL = "http://melanie.gitpages.psi.ch/SciCatPages"

var PROD_API_SERVER string = getEnv("PROD_API_SERVER", "https://dacat.psi.ch/api/v3")
var TEST_API_SERVER string = getEnv("TEST_API_SERVER", "https://dacat-qa.psi.ch/api/v3")
var DEV_API_SERVER string = getEnv("DEV_API_SERVER", "https://dacat-development.psi.ch/api/v3")
const LOCAL_API_SERVER string = "http://backend.localhost/api/v3"
var TUNNEL_API_SERVER string = getEnv("TUNNEL_API_SERVER", "https://dacat-development.psi.ch:5443/api/v3")

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions