-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.go
More file actions
26 lines (23 loc) · 802 Bytes
/
config.go
File metadata and controls
26 lines (23 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main
import (
"github.com/kelseyhightower/envconfig"
)
type config struct {
WorkflowHost string `envconfig:"deis_workflow_service_host"`
WorkflowPort string `envconfig:"deis_workflow_service_port"`
GitHome string `envconfig:"git_home"`
SSHConnection string `envconfig:"ssh_connection"`
SSHOriginalCommand string `envconfig:"ssh_original_command"`
Repository string `envconfig:"repository"`
SHA string `envconfing:"sha"`
Username string `envconfig:"username"`
App string `envconfing:"app"`
Fingerprint string `envconfing:"fingerprint"`
}
func getConfig(appName string) (*config, error) {
conf := &config{}
if err := envconfig(appName, conf); err != nil {
return nil, err
}
return conf, nil
}