fix spelling (#551)
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
type (
|
||||
// Console wraps from the fmt.Sprintf,
|
||||
// by default, it implemented the colorConsole to provide the colorful output to the consle
|
||||
// by default, it implemented the colorConsole to provide the colorful output to the console
|
||||
// and the ideaConsole to output with prefix for the plugin of intellij
|
||||
Console interface {
|
||||
Success(format string, a ...interface{})
|
||||
@@ -81,7 +81,7 @@ func (c *colorConsole) Must(err error) {
|
||||
}
|
||||
}
|
||||
|
||||
// NewIdeaConsole returns a instace of ideaConsole
|
||||
// NewIdeaConsole returns a instance of ideaConsole
|
||||
func NewIdeaConsole() Console {
|
||||
return &ideaConsole{}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func CreateIfNotExist(file string) (*os.File, error) {
|
||||
return os.Create(file)
|
||||
}
|
||||
|
||||
// RemoveIfExist deletes the specficed file if it is exists
|
||||
// RemoveIfExist deletes the specified file if it is exists
|
||||
func RemoveIfExist(filename string) error {
|
||||
if !FileExists(filename) {
|
||||
return nil
|
||||
@@ -36,7 +36,7 @@ func RemoveIfExist(filename string) error {
|
||||
return os.Remove(filename)
|
||||
}
|
||||
|
||||
// RemoveOrQuit deletes the specficed file if read a permit command from stdin
|
||||
// RemoveOrQuit deletes the specified file if read a permit command from stdin
|
||||
func RemoveOrQuit(filename string) error {
|
||||
if !FileExists(filename) {
|
||||
return nil
|
||||
@@ -49,7 +49,7 @@ func RemoveOrQuit(filename string) error {
|
||||
return os.Remove(filename)
|
||||
}
|
||||
|
||||
// FileExists returns true if the specficed file is exists
|
||||
// FileExists returns true if the specified file is exists
|
||||
func FileExists(file string) bool {
|
||||
_, err := os.Stat(file)
|
||||
return err == nil
|
||||
|
||||
@@ -18,7 +18,7 @@ const (
|
||||
upper
|
||||
)
|
||||
|
||||
// ErrNamingFormat defines an error for unknown fomat
|
||||
// ErrNamingFormat defines an error for unknown format
|
||||
var ErrNamingFormat = errors.New("unsupported format")
|
||||
|
||||
type (
|
||||
|
||||
@@ -33,7 +33,7 @@ func MkdirIfNotExist(dir string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// PathFromGoSrc returns the path whihout slash where has been trim the prefix $GOPATH
|
||||
// PathFromGoSrc returns the path without slash where has been trim the prefix $GOPATH
|
||||
func PathFromGoSrc() (string, error) {
|
||||
dir, err := os.Getwd()
|
||||
if err != nil {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"unicode"
|
||||
)
|
||||
|
||||
// String provides for coverting the source text into other spell case,like lower,snake,camel
|
||||
// String provides for converting the source text into other spell case,like lower,snake,camel
|
||||
type String struct {
|
||||
source string
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ type DefaultTemplate struct {
|
||||
savePath string
|
||||
}
|
||||
|
||||
// With returns a instace of DefaultTemplate
|
||||
// With returns a instance of DefaultTemplate
|
||||
func With(name string) *DefaultTemplate {
|
||||
return &DefaultTemplate{
|
||||
name: name,
|
||||
@@ -30,7 +30,7 @@ func (t *DefaultTemplate) Parse(text string) *DefaultTemplate {
|
||||
return t
|
||||
}
|
||||
|
||||
// GoFmt sets the value to goFmt and marks the generated codes will be formated or not
|
||||
// GoFmt sets the value to goFmt and marks the generated codes will be formatted or not
|
||||
func (t *DefaultTemplate) GoFmt(format bool) *DefaultTemplate {
|
||||
t.goFmt = format
|
||||
return t
|
||||
|
||||
Reference in New Issue
Block a user