Skip to content

Commit

Permalink
memory alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
ktong committed Nov 15, 2023
1 parent e184f12 commit 2250792
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import (

// Config is a registry which holds configuration loaded by Loader(s).
type Config struct {
decodeHook mapstructure.DecodeHookFunc
delimiter string
tagName string
decodeHook mapstructure.DecodeHookFunc

onChanges *onChanges
values *provider
providers []*provider
onChanges *onChanges
}

type Unmarshaler interface {
Expand Down Expand Up @@ -163,9 +163,9 @@ func (c Config) Watch(ctx context.Context) error { //nolint:cyclop,funlen
}

type provider struct {
values map[string]any
watcher Watcher
watchOnce sync.Once
values map[string]any
}

func (p *provider) sub(path string, delimiter string) any {
Expand Down
2 changes: 0 additions & 2 deletions global.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ func Get[T any](path string) T { //nolint:ireturn
"path", path,
"type", reflect.TypeOf(value),
)

return *new(T)
}

return value
Expand Down
2 changes: 1 addition & 1 deletion provider/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

// FS is a Provider that loads configuration from file system.
type FS struct {
unmarshal func([]byte, any) error
fs fs.FS
path string
unmarshal func([]byte, any) error
ignoreNotExist bool
}

Expand Down

0 comments on commit 2250792

Please sign in to comment.