Skip to content

Commit 62b2fc1

Browse files
committed
align structs
1 parent 13b1e81 commit 62b2fc1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

models.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import (
1010

1111
// Engine — data model to process settings.
1212
type Engine struct {
13-
Value reflect.Value
1413
Type reflect.Type
15-
NumberOfFields int
1614
Validate *validator.Validate
15+
Value reflect.Value
1716
Field Loop
17+
NumberOfFields int
1818
}
1919

2020
// newEngine creates new model to process settings.
21-
func newEngine(settings interface{}) *Engine {
21+
func newEngine(settings any) *Engine {
2222
return &Engine{
2323
Value: reflect.ValueOf(settings),
2424
Type: reflect.TypeOf(settings),
@@ -28,22 +28,22 @@ func newEngine(settings interface{}) *Engine {
2828

2929
// Loop — variables that used during field processing.
3030
type Loop struct {
31+
value reflect.Value
3132
envTag string
3233
envValue string
3334
validationRule string
35+
defaultSetting string
36+
field reflect.StructField
3437
durationValue time.Duration
3538
int64Value int64
3639
uint64Value uint64
37-
field reflect.StructField
38-
value reflect.Value
40+
float64Value float64
3941
hasEnvTag bool
4042
mustBeOmitted bool
4143
hasEnvValue bool
4244
mustBeValidated bool
4345
required bool
44-
defaultSetting string
4546
hasDefaultSetting bool
46-
float64Value float64
4747
}
4848

4949
// exceedsMaximumUint returns true if the value exceeds the maximum uint value.

0 commit comments

Comments
 (0)