Maint: pass only single strings to logger methods
- Do not assume formatting from logger's interface - Allow to change golibs in the future to accept only strings for logger methods
This commit is contained in:
@@ -19,7 +19,7 @@ var (
|
||||
func (r *routing) addRouteVia(destination net.IPNet, gateway net.IP, iface string, table int) error {
|
||||
destinationStr := destination.String()
|
||||
if r.verbose {
|
||||
r.logger.Info("adding route for %s", destinationStr)
|
||||
r.logger.Info("adding route for " + destinationStr)
|
||||
}
|
||||
if r.debug {
|
||||
fmt.Printf("ip route replace %s via %s dev %s table %d\n", destinationStr, gateway, iface, table)
|
||||
@@ -45,7 +45,7 @@ func (r *routing) addRouteVia(destination net.IPNet, gateway net.IP, iface strin
|
||||
func (r *routing) deleteRouteVia(destination net.IPNet, gateway net.IP, iface string, table int) (err error) {
|
||||
destinationStr := destination.String()
|
||||
if r.verbose {
|
||||
r.logger.Info("deleting route for %s", destinationStr)
|
||||
r.logger.Info("deleting route for " + destinationStr)
|
||||
}
|
||||
if r.debug {
|
||||
fmt.Printf("ip route delete %s via %s dev %s table %d\n", destinationStr, gateway, iface, table)
|
||||
|
||||
Reference in New Issue
Block a user