Skip to content

Commit

Permalink
- Fix nil value
Browse files Browse the repository at this point in the history
- Up version
  • Loading branch information
legion-zver committed Jun 21, 2018
1 parent 0df3b65 commit 940148b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions components/finalizer/finalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ func parseFieldTags(encTagName string, field *reflect.StructField, groups ...str
func Finalize(encTagName string, v interface{}, groups ...string) interface{} {
// TODO: Оптимизировать в будущем
val := reflect.Indirect(reflect.ValueOf(v))
if val.IsNil() || !val.IsValid() {
return v
}
kind := val.Type().Kind()
if kind == reflect.Array || kind == reflect.Slice {
elemKind := val.Type().Elem().Kind()
Expand Down
2 changes: 1 addition & 1 deletion just.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

const (
Version = "v0.1.16"
Version = "v0.1.17"
DebugEnvName = "JUST_DEBUG_MODE"
)

Expand Down

0 comments on commit 940148b

Please sign in to comment.