Skip to content

Commit 80b20c7

Browse files
Merge pull request #27234 from Honny1/fix-linter
quadlet: remove unused 'name' parameter from ConvertNetwork and ConvertVolume
2 parents 8daac52 + 09e535f commit 80b20c7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/quadlet/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,11 +540,11 @@ func process() bool {
540540
service, warnings, err = quadlet.ConvertContainer(unit, isUserFlag, unitsInfoMap)
541541
case strings.HasSuffix(unit.Filename, ".volume"):
542542
warnIfAmbiguousName(unit, quadlet.VolumeGroup)
543-
service, warnings, err = quadlet.ConvertVolume(unit, unit.Filename, unitsInfoMap, isUserFlag)
543+
service, warnings, err = quadlet.ConvertVolume(unit, unitsInfoMap, isUserFlag)
544544
case strings.HasSuffix(unit.Filename, ".kube"):
545545
service, err = quadlet.ConvertKube(unit, unitsInfoMap, isUserFlag)
546546
case strings.HasSuffix(unit.Filename, ".network"):
547-
service, warnings, err = quadlet.ConvertNetwork(unit, unit.Filename, unitsInfoMap, isUserFlag)
547+
service, warnings, err = quadlet.ConvertNetwork(unit, unitsInfoMap, isUserFlag)
548548
case strings.HasSuffix(unit.Filename, ".image"):
549549
warnIfAmbiguousName(unit, quadlet.ImageGroup)
550550
service, err = quadlet.ConvertImage(unit, unitsInfoMap, isUserFlag)

pkg/systemd/quadlet/quadlet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ func defaultOneshotServiceGroup(service *parser.UnitFile, remainAfterExit bool)
958958
// The original Network group is kept around as X-Network.
959959
// Also returns the canonical network name, either auto-generated or user-defined via the
960960
// NetworkName key-value.
961-
func ConvertNetwork(network *parser.UnitFile, name string, unitsInfoMap map[string]*UnitInfo, isUser bool) (*parser.UnitFile, error, error) {
961+
func ConvertNetwork(network *parser.UnitFile, unitsInfoMap map[string]*UnitInfo, isUser bool) (*parser.UnitFile, error, error) {
962962
var warn, warnings error
963963

964964
service, unitInfo, err := initServiceUnitFile(network, isUser, unitsInfoMap, NetworkGroup)
@@ -1047,7 +1047,7 @@ func ConvertNetwork(network *parser.UnitFile, name string, unitsInfoMap map[stri
10471047
// The original Volume group is kept around as X-Volume.
10481048
// Also returns the canonical volume name, either auto-generated or user-defined via the VolumeName
10491049
// key-value.
1050-
func ConvertVolume(volume *parser.UnitFile, name string, unitsInfoMap map[string]*UnitInfo, isUser bool) (*parser.UnitFile, error, error) {
1050+
func ConvertVolume(volume *parser.UnitFile, unitsInfoMap map[string]*UnitInfo, isUser bool) (*parser.UnitFile, error, error) {
10511051
var warn, warnings error
10521052

10531053
service, unitInfo, err := initServiceUnitFile(volume, isUser, unitsInfoMap, VolumeGroup)

0 commit comments

Comments
 (0)