-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused funcs, types and global vars #10085
Conversation
228aa37
to
cc3fd11
Compare
Release note label not set, please set the appropriate release note. |
test-me-please |
cc3fd11
to
db75818
Compare
test-me-please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bits from my codeowners LGTM.
clientPkg "github.com/cilium/cilium/pkg/client" | ||
healthClientPkg "github.com/cilium/cilium/pkg/health/client" | ||
|
||
"github.com/prometheus/client_golang/prometheus" | ||
log "github.com/sirupsen/logrus" | ||
) | ||
|
||
const ( | ||
updateLatencyMetricsInterval = 30 * time.Second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that the const has not been used since the beginning: #4437 (also git log -S updateLatencyMetricsInterval
).
@tklauser needs rebase |
db75818
to
6173a27
Compare
test-me-please |
1 similar comment
test-me-please |
The `log` var is unused in some packages, so remove it where this is the case. Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
This is unused since commit 1121202 ("fqdn: L3-aware L7 DNS policy enforcement") Signed-off-by: Tobias Klauser <[email protected]>
Also reorder initialization in NewDatapath so that embedded types are initialized first. Signed-off-by: Tobias Klauser <[email protected]>
(*linuxNodeHandler).lookupDirectRoute is only used in test code and does not use any members of linuxNodeHandler, so make it a regular function and move it to node_linux_test.go Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
type EndpointPolicyVisibilityEventResult, (*Endpoint).getIDandLabels and (*Endpoint).removeProxyRedirect are unused, remove them. Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
Remove unused type rulesManager and func checkLocks. Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
Signed-off-by: Tobias Klauser <[email protected]>
6173a27
to
da72060
Compare
test-me-please |
1 similar comment
test-me-please |
Remove some unused funcs, types and global vars all over the place, found by running
staticcheck -check U1000
.before:
after:
No big wins here for #10056 yet.
This change is