See how Boundary would look with gofumpt applied (#853)
* See how Boundary would look with https://github.com/mvdan/gofumpt applied Results of running `gofumpt -w -s .` * Update tools file and Makefile for gofumpt Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
This commit is contained in:
1 parent
cca0fbea2b
commit
94cb79bbdd
237 files changed
+1567
-1529
No files matched your search
@@ -42,7 +42,7 @@ func TestAuthToken_DbUpdate(t *testing.T) {
|
||||
future, err := ptypes.TimestampProto(time.Now().Add(time.Hour))
|
||||
require.NoError(t, err)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want *AuthToken
|
||||
@@ -131,7 +131,7 @@ func TestAuthToken_DbCreate(t *testing.T) {
|
||||
return id
|
||||
}
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in *store.AuthToken
|
||||
wantError bool
|
||||
@@ -185,7 +185,7 @@ func TestAuthToken_DbDelete(t *testing.T) {
|
||||
org, _ := iam.TestScopes(t, iam.TestRepo(t, conn, wrapper))
|
||||
existingAuthTok := TestAuthToken(t, conn, kms, org.GetPublicId())
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
at *writableAuthToken
|
||||
wantError bool
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package authtoken
|
||||
|
||||
const defaultAuthTokenTableName = "auth_token_account"
|
||||
const defaultWritableAuthTokenTableName = "auth_token"
|
||||
const (
|
||||
defaultAuthTokenTableName = "auth_token_account"
|
||||
defaultWritableAuthTokenTableName = "auth_token"
|
||||
)
|
||||
|
||||
// TableName returns the table name for the auth token.
|
||||
func (s *AuthToken) TableName() string {
|
||||
|
||||
@@ -26,7 +26,7 @@ func TestAuthToken_ImmutableFields(t *testing.T) {
|
||||
org, _ := iam.TestScopes(t, repo)
|
||||
new := TestAuthToken(t, conn, kms, org.PublicId)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
update *AuthToken
|
||||
fieldMask []string
|
||||
@@ -76,7 +76,6 @@ func TestAuthToken_ImmutableFields(t *testing.T) {
|
||||
require.NoError(err)
|
||||
|
||||
assert.True(proto.Equal(orig, after))
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ func TestRepository_New(t *testing.T) {
|
||||
opts []Option
|
||||
}
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want *Repository
|
||||
@@ -192,7 +192,7 @@ func TestRepository_CreateAuthToken(t *testing.T) {
|
||||
org2, _ := iam.TestScopes(t, repo)
|
||||
u2 := iam.TestUser(t, repo, org2.GetPublicId())
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
iamUser *iam.User
|
||||
authAcctId string
|
||||
@@ -279,7 +279,7 @@ func TestRepository_LookupAuthToken(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, badId)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
id string
|
||||
want *AuthToken
|
||||
@@ -370,7 +370,7 @@ func TestRepository_ValidateToken(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, badToken)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
id string
|
||||
token string
|
||||
@@ -475,7 +475,7 @@ func TestRepository_ValidateToken_expired(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, iamUser)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
staleDuration time.Duration
|
||||
expirationDuration time.Duration
|
||||
@@ -543,7 +543,7 @@ func TestRepository_DeleteAuthToken(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, badId)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
id string
|
||||
want int
|
||||
@@ -609,7 +609,7 @@ func TestRepository_ListAuthTokens(t *testing.T) {
|
||||
|
||||
emptyOrg, _ := iam.TestScopes(t, repo)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
orgId string
|
||||
want []*AuthToken
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
timestamp "github.com/hashicorp/boundary/internal/db/timestamp"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -254,11 +255,14 @@ func file_controller_storage_authtoken_store_v1_authtoken_proto_rawDescGZIP() []
|
||||
return file_controller_storage_authtoken_store_v1_authtoken_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_controller_storage_authtoken_store_v1_authtoken_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_controller_storage_authtoken_store_v1_authtoken_proto_goTypes = []interface{}{
|
||||
(*AuthToken)(nil), // 0: controller.storage.authtoken.store.v1.AuthToken
|
||||
(*timestamp.Timestamp)(nil), // 1: controller.storage.timestamp.v1.Timestamp
|
||||
}
|
||||
var (
|
||||
file_controller_storage_authtoken_store_v1_authtoken_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
file_controller_storage_authtoken_store_v1_authtoken_proto_goTypes = []interface{}{
|
||||
(*AuthToken)(nil), // 0: controller.storage.authtoken.store.v1.AuthToken
|
||||
(*timestamp.Timestamp)(nil), // 1: controller.storage.timestamp.v1.Timestamp
|
||||
}
|
||||
)
|
||||
|
||||
var file_controller_storage_authtoken_store_v1_authtoken_proto_depIdxs = []int32{
|
||||
1, // 0: controller.storage.authtoken.store.v1.AuthToken.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
||||
1, // 1: controller.storage.authtoken.store.v1.AuthToken.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
||||
|
||||
Reference in new issue
Block a user