diff options
author | David Schneiderbauer <daviian@users.noreply.github.com> | 2019-05-18 15:40:05 +0200 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-05-18 14:40:05 +0100 |
commit | 8de76b6e646e91c41143242dc0a8d3ae05b35023 (patch) | |
tree | bf194cb670c5ad2d8faa69452d2329bbaf46812c | |
parent | c385dcc26b0da7fc1c245a1da316551cb6585ad3 (diff) | |
download | gitea-8de76b6e646e91c41143242dc0a8d3ae05b35023.tar.gz gitea-8de76b6e646e91c41143242dc0a8d3ae05b35023.zip |
fix u2f registrationlist ToRegistrations() method (#6980)
-rw-r--r-- | models/u2f.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/u2f.go b/models/u2f.go index 200d417fcc..1224b4a5fb 100644 --- a/models/u2f.go +++ b/models/u2f.go @@ -48,7 +48,7 @@ type U2FRegistrationList []*U2FRegistration // ToRegistrations will convert all U2FRegistrations to u2f.Registrations func (list U2FRegistrationList) ToRegistrations() []u2f.Registration { - regs := make([]u2f.Registration, len(list)) + regs := make([]u2f.Registration, 0, len(list)) for _, reg := range list { r, err := reg.Parse() if err != nil { |