diff --git a/model/command_config.go b/model/command_config.go index 0695f22..240f7bf 100644 --- a/model/command_config.go +++ b/model/command_config.go @@ -135,7 +135,8 @@ func (c *CommandConfig) UpdateImportPath() error { if strings.HasPrefix(currentPath, path) && len(currentPath) > len(path)+1 { importPath = currentPath[len(path)+1:] // Remove the source from the path if it is there - if len(importPath) > 4 && (strings.ToLower(importPath[0:4]) == "src/" || strings.ToLower(importPath[0:4]) == "src\\") { + isSRC := strings.ToLower(importPath[0:4]) + if len(importPath) > 4 && (isSRC = "src/" || isSRC == "src\\")) { importPath = importPath[4:] } else if importPath == "src" { if c.Index != VERSION {