瀏覽代碼

lib/config: Remove unnecessary use of `fmt.Sprintf` (#8458)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
deepsource-autofix[bot] 3 年之前
父節點
當前提交
7e26f74f38
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/config/deviceconfiguration.go

+ 1 - 1
lib/config/deviceconfiguration.go

@@ -69,7 +69,7 @@ func deduplicateObservedFoldersToMap(input []ObservedFolder) map[string]Observed
 
 func (cfg *DeviceConfiguration) Description() string {
 	if cfg.Name == "" {
-		return fmt.Sprintf("%s", cfg.DeviceID.Short())
+		return cfg.DeviceID.Short().String()
 	}
 	return fmt.Sprintf("%s (%s)", cfg.Name, cfg.DeviceID.Short())
 }