From fc50d034ac29289585327a8247b96fe5a9818ade Mon Sep 17 00:00:00 2001 From: Marcos Gaeta Date: Tue, 9 Jul 2024 17:07:56 -0700 Subject: [PATCH] fix lint --- .golangci.yml | 4 +--- go.mod | 4 +--- go.sum | 2 ++ pkg/connector/roles.go | 7 +------ vendor/modules.txt | 2 +- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index dcce381..d61cbba 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -57,7 +57,6 @@ linters-settings: linters: disable-all: true enable: - - deadcode # Finds unused code - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases - gosimple # Linter for Go source code that specializes in simplifying a code - govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string @@ -65,7 +64,6 @@ linters: - staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks - typecheck # Like the front-end of a Go compiler, parses and type-checks Go code - unused # Checks Go code for unused constants, variables, functions and types - - varcheck # Finds unused global variables and constants - asasalint # Check for pass []any as any in variadic func(...any) - asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers - bidichk # Checks for dangerous unicode character sequences @@ -81,7 +79,7 @@ linters: - gocritic # Provides diagnostics that check for bugs, performance and style issues. - godot # Check if comments end in a period - goimports # In addition to fixing imports, goimports also formats your code in the same style as gofmt. - - gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod. +# - gomoddirectives # Manage the use of 'replace', 'retract', and 'excludes' directives in go.mod. - goprintffuncname # Checks that printf-like functions are named with f at the end - gosec # Inspects source code for security problems - nakedret # Finds naked returns in functions greater than a specified function length diff --git a/go.mod b/go.mod index 491a386..906004e 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/conductorone/baton-privx go 1.21 -toolchain go1.22.4 - require ( github.com/SSHcom/privx-sdk-go v1.35.0 github.com/conductorone/baton-sdk v0.1.20 @@ -12,7 +10,7 @@ require ( go.uber.org/zap v1.26.0 ) -replace github.com/SSHcom/privx-sdk-go v1.35.0 => ../privx-sdk-go +replace github.com/SSHcom/privx-sdk-go v1.35.0 => github.com/conductorone/privx-sdk-go v0.0.1 require ( filippo.io/age v1.1.1 // indirect diff --git a/go.sum b/go.sum index f1b2fcb..9cb597b 100644 --- a/go.sum +++ b/go.sum @@ -97,6 +97,8 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/conductorone/baton-sdk v0.1.20 h1:92jU5zXJ5UMxl6hSEbIdx5t3WzlaLwz/w6AvLNi0+wU= github.com/conductorone/baton-sdk v0.1.20/go.mod h1:1VMycIep+HU8JXef2wenT3ECzx1w3Jr3KDQG+L6Mv30= +github.com/conductorone/privx-sdk-go v0.0.1 h1:bigz8MEkOuLJ3xJVPvOKEs85WHCH7MdMHbKihq4DLSo= +github.com/conductorone/privx-sdk-go v0.0.1/go.mod h1:8fUcouMBX54uARVPAvYjIgGMPHXZ9T5/qbUFHmjGmSQ= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/pkg/connector/roles.go b/pkg/connector/roles.go index ff1aada..18d5e92 100644 --- a/pkg/connector/roles.go +++ b/pkg/connector/roles.go @@ -17,11 +17,7 @@ import ( ) const ( - // TODO MARCOS 1.0 are these values going to be used? - RoleMembershipPermanent = "permanent" - RoleMembershipRestricted = "restricted" - RoleMembershipFloating = "floating" - EntitlementAssigned = "assigned" + EntitlementAssigned = "assigned" ) type roleBuilder struct { @@ -71,7 +67,6 @@ func (o *roleBuilder) List( return roleResources, nextToken, nil, nil } -// Entitlements always returns an empty slice for users. func (o *roleBuilder) Entitlements( _ context.Context, resource *v2.Resource, diff --git a/vendor/modules.txt b/vendor/modules.txt index 96bd593..5550994 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -13,7 +13,7 @@ filippo.io/edwards25519/field ## explicit; go 1.16 github.com/BurntSushi/toml github.com/BurntSushi/toml/internal -# github.com/SSHcom/privx-sdk-go v1.35.0 => ../privx-sdk-go +# github.com/SSHcom/privx-sdk-go v1.35.0 => github.com/conductorone/privx-sdk-go v0.0.1 ## explicit; go 1.21 github.com/SSHcom/privx-sdk-go/api/auth github.com/SSHcom/privx-sdk-go/api/rolestore