unnecessary use of fmt.Sprint
137 n.Cfg.Binds = append(n.Cfg.Binds, fmt.Sprintf("%s:/regressbed/images/dut-%s/bof.cfg", vsrBof, n.GetShortName()))
138
139 custEntryFile := filepath.Join(n.Cfg.LabDir, "CustEntry.sh")
140 entryData := fmt.Sprint(`#!/bin/sh141until [ -f /root/run/cf3/bof_ready ]
142do
143 sleep 1
Description
fmt.Sprint
is not needed when there is only one literal string argument to the
function. Similarly, fmt.Sprintf
is not required when the string to be
formatted does not contain any format specifiers.
Bad practice
x := fmt.Sprint("hello")
y := fmt.Sprintf("Say what")
Recommended
x := "hello"
y := "Say what"