chore: update code format. (#628)
This commit is contained in:
@@ -21,11 +21,9 @@ type (
|
||||
MarkDone()
|
||||
Must(err error)
|
||||
}
|
||||
colorConsole struct {
|
||||
}
|
||||
colorConsole struct{}
|
||||
// for idea log
|
||||
ideaConsole struct {
|
||||
}
|
||||
ideaConsole struct{}
|
||||
)
|
||||
|
||||
// NewConsole returns an instance of Console
|
||||
|
||||
@@ -61,8 +61,8 @@ func FindGoModPath(dir string) (string, bool) {
|
||||
|
||||
absDir = strings.ReplaceAll(absDir, `\`, `/`)
|
||||
var rootPath string
|
||||
var tempPath = absDir
|
||||
var hasGoMod = false
|
||||
tempPath := absDir
|
||||
hasGoMod := false
|
||||
for {
|
||||
if FileExists(filepath.Join(tempPath, goModeIdentifier)) {
|
||||
rootPath = strings.TrimPrefix(absDir[len(tempPath):], "/")
|
||||
|
||||
@@ -42,7 +42,7 @@ func (s String) ReplaceAll(old, new string) string {
|
||||
return strings.ReplaceAll(s.source, old, new)
|
||||
}
|
||||
|
||||
//Source returns the source string value
|
||||
// Source returns the source string value
|
||||
func (s String) Source() string {
|
||||
return s.source
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"text/template"
|
||||
)
|
||||
|
||||
const regularPerm = 0666
|
||||
const regularPerm = 0o666
|
||||
|
||||
// DefaultTemplate is a tool to provides the text/template operations
|
||||
type DefaultTemplate struct {
|
||||
|
||||
Reference in New Issue
Block a user