lint: fix gosimple/S1005 errors
This commit is contained in:
parent
1676cf58da
commit
efb100fbca
3 changed files with 4 additions and 4 deletions
|
|
@ -57,7 +57,7 @@ func marshalHelper(input int, mapping map[string]int, errorMessage string) ([]by
|
|||
// See unmarshalHelper for introduction. This helper can create a list of possible values of a single type.
|
||||
func listHelper(mapping map[string]int) []string {
|
||||
ret := make([]string, 0)
|
||||
for k, _ := range mapping {
|
||||
for k := range mapping {
|
||||
ret = append(ret, k)
|
||||
}
|
||||
return ret
|
||||
|
|
@ -65,7 +65,7 @@ func listHelper(mapping map[string]int) []string {
|
|||
|
||||
// See unmarshalHelper for introduction. With this helper one can make sure a value exists in a set of existing values.
|
||||
func existsHelper(mapping map[string]int, testedValue string) bool {
|
||||
for k, _ := range mapping {
|
||||
for k := range mapping {
|
||||
if k == testedValue {
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ func (api *API) modulesInfoHandler(writer http.ResponseWriter, request *http.Req
|
|||
packageInfos := foundPackages.ToPackageInfos()
|
||||
|
||||
if modulesRequested {
|
||||
for i, _ := range packageInfos {
|
||||
for i := range packageInfos {
|
||||
err := packageInfos[i].FillDependencies(api.rpmmd, api.distro.Repositories(api.arch), api.distro.ModulePlatformID())
|
||||
if err != nil {
|
||||
errors := responseError{
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ func TestComposeDelete(t *testing.T) {
|
|||
|
||||
idsInStore := []string{}
|
||||
|
||||
for id, _ := range s.Composes {
|
||||
for id := range s.Composes {
|
||||
idsInStore = append(idsInStore, id.String())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue