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: .golangci.yml
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@ run:
6
6
# When enabled linter will skip directories: vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
7
7
# Skipping `examples` sounds scary to me but skipping `testdata` sounds ok.
8
8
9
-
10
9
# This file contains only configs which differ from defaults.
11
10
# All possible options can be found here https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml
12
11
linters-settings:
@@ -172,7 +171,7 @@ linters:
172
171
- gocritic # provides diagnostics that check for bugs, performance and style issues
173
172
- gocyclo # computes and checks the cyclomatic complexity of functions
174
173
# - godot # checks if comments end in a period
175
-
- goimports # in addition to fixing imports, goimports also formats your code in the same style as gofmt
174
+
# - goimports # in addition to fixing imports, goimports also formats your code in the same style as gofmt
176
175
# - mnd # detects magic numbers
177
176
- gomoddirectives # manages the use of 'replace', 'retract', and 'excludes' directives in go.mod
178
177
- gomodguard # allow and block lists linter for direct Go module dependencies. This is different from depguard where there are different block types for example version constraints and module recommendations
@@ -190,7 +189,7 @@ linters:
190
189
# - nonamedreturns # reports all named returns
191
190
- nosprintfhostport # checks for misuse of Sprintf to construct a host with port in a URL
192
191
- predeclared # finds code that shadows one of Go's predeclared identifiers
193
-
- promlinter # checks Prometheus metrics naming via promlint
192
+
# - promlinter # checks Prometheus metrics naming via promlint
194
193
- reassign # checks that package variables are not reassigned
195
194
# - revive # fast, configurable, extensible, flexible, and beautiful linter for Go, drop-in replacement of golint
196
195
- rowserrcheck # checks whether Err of rows is checked successfully
Copy file name to clipboardExpand all lines: main.go
+10-7Lines changed: 10 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -45,14 +45,17 @@ import (
45
45
)
46
46
47
47
var (
48
-
backendURL=flag.String("backend-url", "http://sandbox_dev", "URL for sandbox backend that runs Go binaries.")
49
-
Port=flag.String("port", "8081", "URL for sandbox backend that runs Go binaries.")
50
-
PluginHookPath=flag.String("hooks-plugins", "", "URL for sandbox backend that runs Go binaries.")
51
-
FileHooksDir=flag.String("hooks-dir", "", "Directory to search for available hooks scripts")
48
+
backendURL=flag.String("backend-url", "http://sandbox_dev", "URL for sandbox backend that runs Go binaries.")
49
+
Port=flag.String("port", "8081", "URL for sandbox backend that runs Go binaries.")
50
+
PluginHookPath=flag.String("hooks-plugins", "", "URL for sandbox backend that runs Go binaries.")
51
+
FileHooksDir=flag.String("hooks-dir", "", "Directory to search for available hooks scripts")
52
+
53
+
// deprecated
52
54
ExternalTemplates=flag.String("external-templates", "", "Comma separated list of templates which will handled externally (plugin for example)")
53
-
ThrottleLimit=flag.Int("throttle-limit", 15, "currently processed requests at a time across all users")
54
-
JWTSecretKey=flag.String("jwt-secret-key", "", "secret key to enable authentication")
55
-
dev=flag.Bool("dev", false, "run in dev mode")
55
+
56
+
ThrottleLimit=flag.Int("throttle-limit", 15, "currently processed requests at a time across all users")
57
+
JWTSecretKey=flag.String("jwt-secret-key", "", "secret key to enable authentication")
58
+
dev=flag.Bool("dev", false, "run in dev mode")
56
59
57
60
CorsAllowOrigin=flag.String("cors-allow-origin", "*", "Regular expression used to determine if the Origin header is allowed. If not, no CORS headers will be sent. By default, all origins are allowed.")
58
61
CorsAllowCredentials=flag.Bool("cors-allow-credentials", false, "Allow credentials by setting Access-Control-Allow-Credentials: true")
0 commit comments