forked from TrueCloudLab/restic
improved slice copying
This commit is contained in:
parent
02014be76c
commit
8b22fe29cf
1 changed files with 2 additions and 4 deletions
|
@ -22,10 +22,8 @@ func Register(ns string, cfg interface{}) {
|
|||
|
||||
// List returns a list of all registered options (using Register()).
|
||||
func List() (list []Help) {
|
||||
list = make([]Help, 0, len(opts))
|
||||
for _, opt := range opts {
|
||||
list = append(list, opt)
|
||||
}
|
||||
list = make([]Help, len(opts))
|
||||
copy(list, opts)
|
||||
return list
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue