aboutsummaryrefslogtreecommitdiffstats
path: root/identity/common.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-08-11 14:08:03 +0200
committerMichael Muré <batolettre@gmail.com>2019-08-11 14:08:03 +0200
commit67a3752e176790e82a48706236f889cab4f8913d (patch)
tree113251396fc2569d1db2c2e6fcadb30289b3aa96 /identity/common.go
parenta0dfc202117e31e01d2d6ec701a41292df35d35d (diff)
downloadgit-bug-67a3752e176790e82a48706236f889cab4f8913d.tar.gz
bug,entity: use a dedicated type to store IDs
Diffstat (limited to 'identity/common.go')
-rw-r--r--identity/common.go6
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