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: cmd/init.go
+18-14Lines changed: 18 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -20,16 +20,20 @@ import (
20
20
21
21
constCodacyApiBase="https://app.codacy.com"
22
22
23
-
varcodacyApiTokenstring
24
-
varremoteProviderstring
25
-
varorganizationstring
26
-
varremoteRepostring
23
+
typeInitFlagsstruct {
24
+
apiTokenstring
25
+
providerstring
26
+
organizationstring
27
+
repositorystring
28
+
}
29
+
30
+
varinitFlagsInitFlags
27
31
28
32
funcinit() {
29
-
initCmd.Flags().StringVar(&codacyApiToken, "api-token", "", "optional codacy api token, if defined configurations will be fetched from codacy")
30
-
initCmd.Flags().StringVar(&remoteProvider, "provider", "", "optional provider (gh/bb/gl), if defined configurations will be fetched from codacy")
31
-
initCmd.Flags().StringVar(&organization, "organization", "", "optional remote organization name, if defined configurations will be fetched from codacy")
32
-
initCmd.Flags().StringVar(&remoteRepo, "repository", "", "optional remote repository name, if defined configurations will be fetched from codacy")
33
+
initCmd.Flags().StringVar(&initFlags.apiToken, "api-token", "", "optional codacy api token, if defined configurations will be fetched from codacy")
34
+
initCmd.Flags().StringVar(&initFlags.provider, "provider", "", "optional provider (gh/bb/gl), if defined configurations will be fetched from codacy")
35
+
initCmd.Flags().StringVar(&initFlags.organization, "organization", "", "optional remote organization name, if defined configurations will be fetched from codacy")
36
+
initCmd.Flags().StringVar(&initFlags.repository, "repository", "", "optional remote repository name, if defined configurations will be fetched from codacy")
0 commit comments