Skip to content

Commit

Permalink
fix: trim suffix value ignored
Browse files Browse the repository at this point in the history
Signed-off-by: Chin-Ya Huang <[email protected]>
  • Loading branch information
c3y1huang committed Aug 2, 2023
1 parent 4c32705 commit dec3341
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions iscsi/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ func UpdateLun(tid int, lun int, params map[string]string) error {
for k, v := range params {
paramStr += fmt.Sprintf("%s=%s,", k, v)
}
strings.TrimSuffix(paramStr, ",")
opts = append(opts, "--params", paramStr)
opts = append(opts, "--params", strings.TrimSuffix(paramStr, ","))
}
_, err := util.Execute(tgtBinary, opts)
return err
Expand Down

0 comments on commit dec3341

Please sign in to comment.