Skip to content

Commit

Permalink
use of copy
Browse files Browse the repository at this point in the history
  • Loading branch information
dencoded committed Nov 24, 2017
1 parent a0260be commit 8097806
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ func getApiSpecs() []*APISpec {
return nil
}
apiSpecsTmp := make([]*APISpec, len(apiSpecs))
for index, val := range apiSpecs {
apiSpecsTmp[index] = val
}
copy(apiSpecsTmp, apiSpecs)
return apiSpecsTmp
}

Expand Down

0 comments on commit 8097806

Please sign in to comment.