diff --git a/internal/auth/oidc/auth_method.go b/internal/auth/oidc/auth_method.go index 20fb86dd18..e1d3276ab5 100644 --- a/internal/auth/oidc/auth_method.go +++ b/internal/auth/oidc/auth_method.go @@ -412,10 +412,6 @@ func (am *AuthMethod) convertAccountClaimMaps(ctx context.Context) ([]*AccountCl return nil, errors.New(ctx, errors.InvalidPublicId, op, "missing public id") } newAccountClaimMaps := make([]*AccountClaimMap, 0, len(am.AccountClaimMaps)) - const ( - from = 0 - to = 1 - ) acms, err := ParseAccountClaimMaps(ctx, am.AccountClaimMaps...) if err != nil { return nil, errors.Wrap(ctx, err, op) diff --git a/internal/auth/oidc/auth_method_test.go b/internal/auth/oidc/auth_method_test.go index 67c7017832..588cc4d035 100644 --- a/internal/auth/oidc/auth_method_test.go +++ b/internal/auth/oidc/auth_method_test.go @@ -5,7 +5,6 @@ package oidc import ( "context" - "net/url" "sort" "testing" @@ -35,7 +34,6 @@ func TestAuthMethod_Create(t *testing.T) { type args struct { scopeId string - issuer *url.URL clientId string clientSecret ClientSecret opt []Option diff --git a/internal/auth/oidc/provider_test.go b/internal/auth/oidc/provider_test.go index 18f8ef7372..7717ca7fc5 100644 --- a/internal/auth/oidc/provider_test.go +++ b/internal/auth/oidc/provider_test.go @@ -107,7 +107,6 @@ func Test_convertToProvider(t *testing.T) { testAm.ApiUrl = allowedRedirect testAm.Certificates = []string{tp.CACert()} - type args struct{} tests := []struct { name string am *AuthMethod diff --git a/internal/clientcache/internal/cache/consts.go b/internal/clientcache/internal/cache/consts.go index 2321907d6d..a81d7cfaf0 100644 --- a/internal/clientcache/internal/cache/consts.go +++ b/internal/clientcache/internal/cache/consts.go @@ -10,8 +10,4 @@ const ( // defaultLimitedResultSetSize is the default number of results to // return when limiting defaultLimitedResultSetSize = 250 - - // unlimitedMaxResultSetSize is the value to use when we want to return all - // results - unlimitedMaxResultSetSize = -1 ) diff --git a/internal/clientcache/internal/cache/repository_token_test.go b/internal/clientcache/internal/cache/repository_token_test.go index 20c7ff2d52..3d437f4bae 100644 --- a/internal/clientcache/internal/cache/repository_token_test.go +++ b/internal/clientcache/internal/cache/repository_token_test.go @@ -829,12 +829,6 @@ var infinityValue = infinityDate{ IsInfinity: true, } -// negInfinityValue represents a time.Time that is negative infinity -var negInfinityValue = infinityDate{ - Time: time.Time{}, - IsNegInfinity: true, -} - // infinityDate is used to represent a time.Time that can be infinity, neg // infinity or a regular time.Time type infinityDate struct { diff --git a/internal/cmd/commands/aliasescmd/funcs.go b/internal/cmd/commands/aliasescmd/funcs.go index b45c4ce11a..7e2d1dd6da 100644 --- a/internal/cmd/commands/aliasescmd/funcs.go +++ b/internal/cmd/commands/aliasescmd/funcs.go @@ -12,10 +12,6 @@ import ( "github.com/hashicorp/boundary/internal/cmd/base" ) -type extraCmdVars struct { - flagMembers []string -} - func (c *Command) extraHelpFunc(helpMap map[string]func() string) string { var helpStr string switch c.Func { diff --git a/internal/cmd/commands/connect/connect.go b/internal/cmd/commands/connect/connect.go index aac30cac66..986e0c6886 100644 --- a/internal/cmd/commands/connect/connect.go +++ b/internal/cmd/commands/connect/connect.go @@ -28,8 +28,6 @@ import ( exec "golang.org/x/sys/execabs" ) -const sessionCancelTimeout = 10 * time.Second - type SessionInfo struct { Address string `json:"address"` Port int `json:"port"` diff --git a/internal/daemon/controller/handlers/accounts/account_service.go b/internal/daemon/controller/handlers/accounts/account_service.go index af84da346f..4b913d3458 100644 --- a/internal/daemon/controller/handlers/accounts/account_service.go +++ b/internal/daemon/controller/handlers/accounts/account_service.go @@ -62,8 +62,6 @@ const ( emailAttrField = "attributes.email" dnAttrField = "attributes.dn" memberOfAttrField = "attributes.member_of_groups" - - domain = "auth" ) var ( diff --git a/internal/daemon/controller/handlers/accounts/account_service_test.go b/internal/daemon/controller/handlers/accounts/account_service_test.go index 7a5e549d2f..246fc057dd 100644 --- a/internal/daemon/controller/handlers/accounts/account_service_test.go +++ b/internal/daemon/controller/handlers/accounts/account_service_test.go @@ -45,8 +45,6 @@ import ( "google.golang.org/protobuf/types/known/wrapperspb" ) -const domain = "auth" - var ( pwAuthorizedActions = []string{ action.NoOp.String(), diff --git a/internal/daemon/controller/handlers/host_sets/host_set_service.go b/internal/daemon/controller/handlers/host_sets/host_set_service.go index 918c83b1ad..7db8c37959 100644 --- a/internal/daemon/controller/handlers/host_sets/host_set_service.go +++ b/internal/daemon/controller/handlers/host_sets/host_set_service.go @@ -68,8 +68,6 @@ var ( ) ) -const domain = "host" - func init() { var err error if maskManager[static.Subtype], err = handlers.NewMaskManager( diff --git a/internal/oplog/testing.go b/internal/oplog/testing.go index f5f5ba5845..fceb24bbe2 100644 --- a/internal/oplog/testing.go +++ b/internal/oplog/testing.go @@ -158,10 +158,6 @@ order by ccu.table_name,pgc.conname ` rw := dbw.New(db) rows, err := rw.Query(testCtx, constraintSql, []any{tableName}) require.NoError(err) - type result struct { - Name string - TableName string - } results := []constraintResults{} for rows.Next() { var r constraintResults diff --git a/internal/types/subtypes/attributes_test.go b/internal/types/subtypes/attributes_test.go index f1cf6384d6..506e9cdcd7 100644 --- a/internal/types/subtypes/attributes_test.go +++ b/internal/types/subtypes/attributes_test.go @@ -51,7 +51,6 @@ func TestProtoAttributeKey(t *testing.T) { } func TestProtoAttributeKeyErrors(t *testing.T) { - type notproto struct{} cases := []struct { name string msg proto.Message