perf: apply fieldalignement (#1284)
This commit is contained in:
parent
da1890380e
commit
9dd4de6f1f
27 changed files with 90 additions and 94 deletions
|
|
@ -17,9 +17,9 @@ func TestFactoryValid(t *testing.T) {
|
|||
|
||||
t.Run("invalid config", func(t *testing.T) {
|
||||
for _, tt := range []struct {
|
||||
err error
|
||||
name string
|
||||
cfg Config
|
||||
err error
|
||||
}{
|
||||
{
|
||||
name: "missing path",
|
||||
|
|
|
|||
|
|
@ -88,8 +88,8 @@ func (Factory) Valid(data json.RawMessage) error {
|
|||
}
|
||||
|
||||
type Config struct {
|
||||
PathStyle bool `json:"pathStyle"`
|
||||
BucketName string `json:"bucketName"`
|
||||
PathStyle bool `json:"pathStyle"`
|
||||
}
|
||||
|
||||
func (c Config) Valid() error {
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ import (
|
|||
|
||||
// mockS3 is an in-memory mock of the methods we use.
|
||||
type mockS3 struct {
|
||||
mu sync.RWMutex
|
||||
bucket string
|
||||
data map[string][]byte
|
||||
meta map[string]map[string]string
|
||||
bucket string
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
func (m *mockS3) PutObject(ctx context.Context, in *s3.PutObjectInput, _ ...func(*s3.Options)) (*s3.PutObjectOutput, error) {
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ func Common(t *testing.T, f store.Factory, config json.RawMessage) {
|
|||
}
|
||||
|
||||
for _, tt := range []struct {
|
||||
name string
|
||||
doer func(t *testing.T, s store.Interface) error
|
||||
err error
|
||||
doer func(t *testing.T, s store.Interface) error
|
||||
name string
|
||||
}{
|
||||
{
|
||||
name: "basic get set delete",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue