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
@@ -22,7 +22,7 @@ func TestAccount_New(t *testing.T) {
|
||||
opts []Option
|
||||
}
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want *Account
|
||||
|
||||
@@ -121,7 +121,7 @@ func TestArgon2Configuration_Readonly(t *testing.T) {
|
||||
authMethod := authMethods[0]
|
||||
authMethodId := authMethod.GetPublicId()
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
chgFn func(*Argon2Configuration) (*Argon2Configuration, []string)
|
||||
}{
|
||||
@@ -157,11 +157,10 @@ func TestArgon2Configuration_Readonly(t *testing.T) {
|
||||
assert.Equal(0, count)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestArgon2Configuration_Validate(t *testing.T) {
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in *Argon2Configuration
|
||||
want error
|
||||
@@ -315,7 +314,7 @@ func TestArgon2Credential_New(t *testing.T) {
|
||||
password string
|
||||
conf *Argon2Configuration
|
||||
}
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want *Argon2Credential
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestAuthMethod_New(t *testing.T) {
|
||||
opts []Option
|
||||
}
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want *AuthMethod
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCheckLoginName(t *testing.T) {
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
in string
|
||||
want bool
|
||||
}{
|
||||
@@ -50,7 +50,7 @@ func TestRepository_CreateAccount(t *testing.T) {
|
||||
authMethods := TestAuthMethods(t, conn, org.GetPublicId(), 1)
|
||||
authMethod := authMethods[0]
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in *Account
|
||||
opts []Option
|
||||
@@ -333,7 +333,7 @@ func TestRepository_LookupAccount(t *testing.T) {
|
||||
|
||||
newAcctId, err := newAccountId()
|
||||
require.NoError(t, err)
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in string
|
||||
want *Account
|
||||
@@ -387,7 +387,7 @@ func TestRepository_DeleteAccount(t *testing.T) {
|
||||
|
||||
newAcctId, err := newAccountId()
|
||||
require.NoError(t, err)
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in string
|
||||
want int
|
||||
@@ -442,7 +442,7 @@ func TestRepository_ListAccounts(t *testing.T) {
|
||||
accounts2 := TestAccounts(t, conn, authMethods[1].GetPublicId(), 4)
|
||||
_ = accounts2
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in string
|
||||
opts []Option
|
||||
@@ -498,7 +498,7 @@ func TestRepository_ListAccounts_Limits(t *testing.T) {
|
||||
accountCount := 10
|
||||
_ = TestAccounts(t, conn, am.GetPublicId(), accountCount)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
repoOpts []Option
|
||||
listOpts []Option
|
||||
@@ -619,7 +619,7 @@ func TestRepository_UpdateAccount(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
orig *Account
|
||||
chgFn func(*Account) *Account
|
||||
|
||||
@@ -28,7 +28,7 @@ func TestRepository_CreateAuthMethod(t *testing.T) {
|
||||
iamRepo := iam.TestRepo(t, conn, wrapper)
|
||||
org, _ := iam.TestScopes(t, iamRepo)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in *AuthMethod
|
||||
opts []Option
|
||||
@@ -266,7 +266,7 @@ func TestRepository_LookupAuthMethod(t *testing.T) {
|
||||
|
||||
amId, err := newAuthMethodId()
|
||||
require.NoError(t, err)
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in string
|
||||
want *AuthMethod
|
||||
@@ -317,7 +317,7 @@ func TestRepository_DeleteAuthMethod(t *testing.T) {
|
||||
|
||||
newAuthMethodId, err := newAuthMethodId()
|
||||
require.NoError(t, err)
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in string
|
||||
want int
|
||||
@@ -368,7 +368,7 @@ func TestRepository_ListAuthMethods(t *testing.T) {
|
||||
o, _ := iam.TestScopes(t, iamRepo)
|
||||
authMethods := TestAuthMethods(t, conn, o.GetPublicId(), 3)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in string
|
||||
opts []Option
|
||||
@@ -420,7 +420,7 @@ func TestRepository_ListAuthMethods_Limits(t *testing.T) {
|
||||
authMethodCount := 10
|
||||
ams := TestAuthMethods(t, conn, o.GetPublicId(), authMethodCount)
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
repoOpts []Option
|
||||
listOpts []Option
|
||||
|
||||
@@ -136,7 +136,7 @@ func TestRepository_GetConfiguration(t *testing.T) {
|
||||
authMethodId := authMethod.GetPublicId()
|
||||
ctx := context.Background()
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
authMethodId string
|
||||
want *Argon2Configuration
|
||||
@@ -207,7 +207,7 @@ func TestRepository_SetConfiguration(t *testing.T) {
|
||||
authMethod := authMethods[0]
|
||||
authMethodId := authMethod.GetPublicId()
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
in Configuration
|
||||
want *Argon2Configuration
|
||||
|
||||
@@ -45,7 +45,7 @@ func TestRepository_Authenticate(t *testing.T) {
|
||||
password string
|
||||
}
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want *Account
|
||||
@@ -272,7 +272,7 @@ func TestRepository_ChangePassword(t *testing.T) {
|
||||
old, new string
|
||||
}
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
wantAccount bool
|
||||
@@ -447,7 +447,7 @@ func TestRepository_SetPassword(t *testing.T) {
|
||||
return ""
|
||||
}
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
oldPw string
|
||||
newPw string
|
||||
@@ -537,5 +537,4 @@ func TestRepository_SetPassword(t *testing.T) {
|
||||
assert.Nil(acct)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,7 +24,7 @@ func TestRepository_New(t *testing.T) {
|
||||
opts []Option
|
||||
}
|
||||
|
||||
var tests = []struct {
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want *Repository
|
||||
|
||||
@@ -9,11 +9,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 (
|
||||
@@ -370,12 +371,15 @@ func file_controller_storage_auth_password_store_v1_argon2_proto_rawDescGZIP() [
|
||||
return file_controller_storage_auth_password_store_v1_argon2_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_controller_storage_auth_password_store_v1_argon2_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_controller_storage_auth_password_store_v1_argon2_proto_goTypes = []interface{}{
|
||||
(*Argon2Configuration)(nil), // 0: controller.storage.auth.password.store.v1.Argon2Configuration
|
||||
(*Argon2Credential)(nil), // 1: controller.storage.auth.password.store.v1.Argon2Credential
|
||||
(*timestamp.Timestamp)(nil), // 2: controller.storage.timestamp.v1.Timestamp
|
||||
}
|
||||
var (
|
||||
file_controller_storage_auth_password_store_v1_argon2_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
file_controller_storage_auth_password_store_v1_argon2_proto_goTypes = []interface{}{
|
||||
(*Argon2Configuration)(nil), // 0: controller.storage.auth.password.store.v1.Argon2Configuration
|
||||
(*Argon2Credential)(nil), // 1: controller.storage.auth.password.store.v1.Argon2Credential
|
||||
(*timestamp.Timestamp)(nil), // 2: controller.storage.timestamp.v1.Timestamp
|
||||
}
|
||||
)
|
||||
|
||||
var file_controller_storage_auth_password_store_v1_argon2_proto_depIdxs = []int32{
|
||||
2, // 0: controller.storage.auth.password.store.v1.Argon2Configuration.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
||||
2, // 1: controller.storage.auth.password.store.v1.Argon2Credential.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
||||
|
||||
@@ -9,12 +9,13 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
timestamp "github.com/hashicorp/boundary/internal/db/timestamp"
|
||||
_ "github.com/hashicorp/boundary/internal/gen/controller/protooptions"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -459,13 +460,16 @@ func file_controller_storage_auth_password_store_v1_password_proto_rawDescGZIP()
|
||||
return file_controller_storage_auth_password_store_v1_password_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_controller_storage_auth_password_store_v1_password_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_controller_storage_auth_password_store_v1_password_proto_goTypes = []interface{}{
|
||||
(*AuthMethod)(nil), // 0: controller.storage.auth.password.store.v1.AuthMethod
|
||||
(*Account)(nil), // 1: controller.storage.auth.password.store.v1.Account
|
||||
(*Credential)(nil), // 2: controller.storage.auth.password.store.v1.Credential
|
||||
(*timestamp.Timestamp)(nil), // 3: controller.storage.timestamp.v1.Timestamp
|
||||
}
|
||||
var (
|
||||
file_controller_storage_auth_password_store_v1_password_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
file_controller_storage_auth_password_store_v1_password_proto_goTypes = []interface{}{
|
||||
(*AuthMethod)(nil), // 0: controller.storage.auth.password.store.v1.AuthMethod
|
||||
(*Account)(nil), // 1: controller.storage.auth.password.store.v1.Account
|
||||
(*Credential)(nil), // 2: controller.storage.auth.password.store.v1.Credential
|
||||
(*timestamp.Timestamp)(nil), // 3: controller.storage.timestamp.v1.Timestamp
|
||||
}
|
||||
)
|
||||
|
||||
var file_controller_storage_auth_password_store_v1_password_proto_depIdxs = []int32{
|
||||
3, // 0: controller.storage.auth.password.store.v1.AuthMethod.create_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
||||
3, // 1: controller.storage.auth.password.store.v1.AuthMethod.update_time:type_name -> controller.storage.timestamp.v1.Timestamp
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
_ "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 (
|
||||
@@ -142,10 +143,13 @@ func file_controller_storage_auth_store_v1_account_proto_rawDescGZIP() []byte {
|
||||
return file_controller_storage_auth_store_v1_account_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_controller_storage_auth_store_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_controller_storage_auth_store_v1_account_proto_goTypes = []interface{}{
|
||||
(*Account)(nil), // 0: controller.storage.auth.store.v1.Account
|
||||
}
|
||||
var (
|
||||
file_controller_storage_auth_store_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
file_controller_storage_auth_store_v1_account_proto_goTypes = []interface{}{
|
||||
(*Account)(nil), // 0: controller.storage.auth.store.v1.Account
|
||||
}
|
||||
)
|
||||
|
||||
var file_controller_storage_auth_store_v1_account_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
package store
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
_ "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 (
|
||||
@@ -199,11 +200,14 @@ func file_controller_storage_auth_store_v1_auth_method_proto_rawDescGZIP() []byt
|
||||
return file_controller_storage_auth_store_v1_auth_method_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_controller_storage_auth_store_v1_auth_method_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_controller_storage_auth_store_v1_auth_method_proto_goTypes = []interface{}{
|
||||
(*AuthMethod)(nil), // 0: controller.storage.auth.store.v1.AuthMethod
|
||||
(*AuthAccount)(nil), // 1: controller.storage.auth.store.v1.AuthAccount
|
||||
}
|
||||
var (
|
||||
file_controller_storage_auth_store_v1_auth_method_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
file_controller_storage_auth_store_v1_auth_method_proto_goTypes = []interface{}{
|
||||
(*AuthMethod)(nil), // 0: controller.storage.auth.store.v1.AuthMethod
|
||||
(*AuthAccount)(nil), // 1: controller.storage.auth.store.v1.AuthAccount
|
||||
}
|
||||
)
|
||||
|
||||
var file_controller_storage_auth_store_v1_auth_method_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
|
||||
Reference in new issue
Block a user