diff options
author | Michael Muré <batolettre@gmail.com> | 2019-08-11 14:08:03 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-08-11 14:08:03 +0200 |
commit | 67a3752e176790e82a48706236f889cab4f8913d (patch) | |
tree | 113251396fc2569d1db2c2e6fcadb30289b3aa96 /identity/common.go | |
parent | a0dfc202117e31e01d2d6ec701a41292df35d35d (diff) | |
download | git-bug-67a3752e176790e82a48706236f889cab4f8913d.tar.gz |
bug,entity: use a dedicated type to store IDs
Diffstat (limited to 'identity/common.go')
-rw-r--r-- | identity/common.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/identity/common.go b/identity/common.go index 2f2b9042..68a6d57c 100644 --- a/identity/common.go +++ b/identity/common.go @@ -37,11 +37,11 @@ func UnmarshalJSON(raw json.RawMessage) (Interface, error) { } // Fallback on a legacy Bare identity - var b Bare + b := &Bare{} - err = json.Unmarshal(raw, &b) + err = json.Unmarshal(raw, b) if err == nil && (b.name != "" || b.login != "") { - return &b, nil + return b, nil } // abort if we have an error other than the wrong type |