You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: config/config.go
+27-20
Original file line number
Diff line number
Diff line change
@@ -9,33 +9,40 @@ import (
9
9
)
10
10
11
11
const (
12
-
keyAction="ACTION"
13
-
keyEnterprise="ENTERPRISE"
14
-
keyGithubToken="GITHUB_TOKEN"
15
-
keyTemplateFile="TEMPLATE_FILE"
16
-
keyVerbose="VERBOSE"
17
-
keyOutputFile="OUTPUT_FILE"
18
-
keyOwnDomains="OWN_DOMAINS"
12
+
keyAction="action"
13
+
kkeyActionEnvironment="ACTION"
14
+
keyEnterprise="enterprise"
15
+
keyEnterpriseEnvironment="ENTERPRISE"
16
+
keyGithubToken="githubToken"
17
+
keyGithubTokenEnvironment="GITHUB_TOKEN"
18
+
keyTemplateFiles="template-files"
19
+
keyTemplateFilesEnvironment="TEMPLATE_FILES"
20
+
keyOutputFiles="output-files"
21
+
keyOutputFilesEnvironment="OUTPUT_FILES"
22
+
keyVerbose="verbose"
23
+
keyVerboseEnvironment="VERBOSE"
24
+
keyOwnDomains="own-domains"
25
+
keyOwnDomainsEnvironment="OWN_DOMAINS"
19
26
)
20
27
21
28
typeConfigstruct {
22
-
Actionstring
23
-
Enterprisestring
24
-
GithubTokenstring
25
-
TemplateFilestring
26
-
OutputFilestring
27
-
OwnDomainsstring
29
+
Actionstring
30
+
Enterprisestring
31
+
GithubTokenstring
32
+
TemplateFilesstring
33
+
OutputFilesstring
34
+
OwnDomainsstring
28
35
}
29
36
30
37
funcNew() (*Config, error) {
31
38
c:=Config{}
32
-
flag.StringVar(&c.Action, keyAction, lookupEnvOrString("ACTION", ""), "The action to perform.")
33
-
flag.StringVar(&c.Enterprise, keyEnterprise, lookupEnvOrString("ENTERPRISE", ""), "The GitHub Enterprise to query for repositories.")
34
-
flag.StringVar(&c.GithubToken, keyGithubToken, lookupEnvOrString("GITHUB_TOKEN", ""), "The GitHub Token to use for authentication.")
35
-
flag.StringVar(&c.TemplateFile, keyTemplateFile, lookupEnvOrString("TEMPLATE_FILE", "template/members.tpl"), "The template file to use for rendering the result.")
36
-
flag.StringVar(&c.OutputFile, keyOutputFile, lookupEnvOrString("OUTPUT_FILE", ""), "The output file to write the result to.")
37
-
flag.StringVar(&c.OwnDomains, keyOwnDomains, lookupEnvOrString("OWN_DOMAINS", ""), "The comma separated list of domains to consider as own domains.")
flag.StringVar(&c.Action, keyAction, lookupEnvOrString(kkeyActionEnvironment, ""), "The action to perform.")
40
+
flag.StringVar(&c.Enterprise, keyEnterprise, lookupEnvOrString(keyEnterpriseEnvironment, ""), "The GitHub Enterprise to query for repositories.")
41
+
flag.StringVar(&c.GithubToken, keyGithubToken, lookupEnvOrString(keyGithubTokenEnvironment, ""), "The GitHub Token to use for authentication.")
42
+
flag.StringVar(&c.TemplateFiles, keyTemplateFiles, lookupEnvOrString(keyTemplateFilesEnvironment, "template/members.tpl"), "The template file to use for rendering the result.")
43
+
flag.StringVar(&c.OutputFiles, keyOutputFiles, lookupEnvOrString(keyOutputFilesEnvironment, ""), "The output file to write the result to.")
44
+
flag.StringVar(&c.OwnDomains, keyOwnDomains, lookupEnvOrString(keyOwnDomainsEnvironment, ""), "The comma separated list of domains to consider as own domains.")
0 commit comments