Skip to content
Snippets Groups Projects
Unverified Commit 11e16400 authored by Mariano Cano's avatar Mariano Cano
Browse files

Fix linter errors

parent 52f0bf51
No related branches found
No related tags found
No related merge requests found
...@@ -47,12 +47,16 @@ race: ...@@ -47,12 +47,16 @@ race:
fmt: fmt:
$Q goimports -local github.com/golangci/golangci-lint -l -w $(SRC) $Q goimports -local github.com/golangci/golangci-lint -l -w $(SRC)
lint: SHELL:=/bin/bash lint: golint govulncheck
lint:
golint: SHELL:=/bin/bash
golint:
$Q LOG_LEVEL=error golangci-lint run --config <(curl -s https://raw.githubusercontent.com/smallstep/workflows/master/.golangci.yml) --timeout=30m $Q LOG_LEVEL=error golangci-lint run --config <(curl -s https://raw.githubusercontent.com/smallstep/workflows/master/.golangci.yml) --timeout=30m
govulncheck:
$Q govulncheck ./... $Q govulncheck ./...
.PHONY: fmt lint .PHONY: fmt lint golint govulncheck
######################################### #########################################
# Clean # Clean
......
...@@ -122,7 +122,7 @@ func installPlatform(filename string, cert *x509.Certificate) error { ...@@ -122,7 +122,7 @@ func installPlatform(filename string, cert *x509.Certificate) error {
return nil return nil
} }
func uninstallPlatform(filename string, cert *x509.Certificate) error { func uninstallPlatform(filename string, _ *x509.Certificate) error {
cmd := exec.Command("sudo", "security", "remove-trusted-cert", "-d", filename) cmd := exec.Command("sudo", "security", "remove-trusted-cert", "-d", filename)
out, err := cmd.CombinedOutput() out, err := cmd.CombinedOutput()
if err != nil { if err != nil {
......
...@@ -87,7 +87,7 @@ func (t *JavaTrust) Install(filename string, cert *x509.Certificate) error { ...@@ -87,7 +87,7 @@ func (t *JavaTrust) Install(filename string, cert *x509.Certificate) error {
} }
// Uninstall implements the Trust interface. // Uninstall implements the Trust interface.
func (t *JavaTrust) Uninstall(filename string, cert *x509.Certificate) error { func (t *JavaTrust) Uninstall(_ string, cert *x509.Certificate) error {
args := []string{ args := []string{
"-delete", "-delete",
"-alias", uniqueName(cert), "-alias", uniqueName(cert),
......
...@@ -82,7 +82,7 @@ func installPlatform(filename string, cert *x509.Certificate) error { ...@@ -82,7 +82,7 @@ func installPlatform(filename string, cert *x509.Certificate) error {
return nil return nil
} }
func uninstallPlatform(filename string, cert *x509.Certificate) error { func uninstallPlatform(_ string, cert *x509.Certificate) error {
if SystemTrustCommand == nil { if SystemTrustCommand == nil {
return ErrNotSupported return ErrNotSupported
} }
......
...@@ -80,7 +80,7 @@ func (t *NSSTrust) Install(filename string, cert *x509.Certificate) error { ...@@ -80,7 +80,7 @@ func (t *NSSTrust) Install(filename string, cert *x509.Certificate) error {
} }
// Uninstall implements the Trust interface. // Uninstall implements the Trust interface.
func (t *NSSTrust) Uninstall(filename string, cert *x509.Certificate) (err error) { func (t *NSSTrust) Uninstall(_ string, cert *x509.Certificate) (err error) {
forEachNSSProfile(func(profile string) { forEachNSSProfile(func(profile string) {
if err != nil { if err != nil {
return return
......
//go:build !linux && !darwin && !windows && !freebsd
// +build !linux,!darwin,!windows,!freebsd // +build !linux,!darwin,!windows,!freebsd
package truststore package truststore
...@@ -12,10 +13,10 @@ var ( ...@@ -12,10 +13,10 @@ var (
CertutilInstallHelp = "" CertutilInstallHelp = ""
) )
func installPlatform(filename string, cert *x509.Certificate) error { func installPlatform(string, *x509.Certificate) error {
return ErrTrustNotSupported return ErrTrustNotSupported
} }
func uninstallPlatform(filename string, cert *x509.Certificate) error { func uninstallPlatform(string, *x509.Certificate) error {
return ErrTrustNotSupported return ErrTrustNotSupported
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment