Skip to content

Commit

Permalink
Decrease indentation to satisfy linter
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Aschan <[email protected]>
  • Loading branch information
tomasaschan committed Oct 1, 2021
1 parent ced2aed commit 3dbb1a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ func builtinFuncs(config *print.Config) gotemplate.FuncMap { // nolint:gocyclo

// resolving module urls
"moduleURL": func(s string) string {
if strings.HasPrefix(s, "git@") {
patched := strings.TrimPrefix(s, "git@")
patched = strings.Replace(patched, ":", "/", 1)
return "https://" + patched
} else {
if !strings.HasPrefix(s, "git@") {
return s
}

patched := strings.TrimPrefix(s, "git@")
patched = strings.Replace(patched, ":", "/", 1)
return "https://" + patched
},
}
}
Expand Down

0 comments on commit 3dbb1a9

Please sign in to comment.