Modify comment syntax error (#2572)

This commit is contained in:
王哈哈
2022-11-04 21:55:17 +08:00
committed by GitHub
parent 3db64c7d47
commit dac3600b53
24 changed files with 32 additions and 32 deletions

View File

@@ -16,7 +16,7 @@ import (
)
var (
// Cmd describes a api command.
// Cmd describes an api command.
Cmd = &cobra.Command{
Use: "api",
Short: "Generate api related files",

View File

@@ -75,7 +75,7 @@ func (t PointerType) Documents() []string {
return nil
}
// Name returns a interface string, Its fixed value is interface{}
// Name returns an interface string, Its fixed value is interface{}
func (t InterfaceType) Name() string {
return t.RawName
}

View File

@@ -19,7 +19,7 @@ type (
Comment Doc
}
// ApiSpec describes a api file
// ApiSpec describes an api file
ApiSpec struct {
Info Info
Syntax ApiSyntax
@@ -129,7 +129,7 @@ type (
Value Type
}
// InterfaceType describes a interface for api
// InterfaceType describes an interface for api
InterfaceType struct {
RawName string
}

View File

@@ -8,7 +8,7 @@ var (
boolVarVerbose bool
boolVarInstall bool
// Cmd describes a env command.
// Cmd describes an env command.
Cmd = &cobra.Command{
Use: "env",
Short: "Check or edit goctl environment",

View File

@@ -1,7 +1,7 @@
package template
const (
// Imports defines a import template for model in cache case
// Imports defines an import template for model in cache case
Imports = `import (
"context"
"database/sql"
@@ -17,7 +17,7 @@ const (
"github.com/zeromicro/go-zero/core/stringx"
)
`
// ImportsNoCache defines a import template for model in normal case
// ImportsNoCache defines an import template for model in normal case
ImportsNoCache = `import (
"context"
"database/sql"

View File

@@ -11,7 +11,7 @@ import (
var (
ErrInvalidKVExpression = errors.New(`invalid key-value expression`)
ErrInvalidKVS = errors.New("the length of kv must be a even number")
ErrInvalidKVS = errors.New("the length of kv must be an even number")
)
type KV []interface{}

View File

@@ -2,7 +2,7 @@ package upgrade
import "github.com/spf13/cobra"
// Cmd describes a upgrade command.
// Cmd describes an upgrade command.
var Cmd = &cobra.Command{
Use: "upgrade",
Short: "Upgrade goctl to latest version",

View File

@@ -115,7 +115,7 @@ func (c *colorConsole) Must(err error) {
}
}
// NewIdeaConsole returns a instance of ideaConsole
// NewIdeaConsole returns an instance of ideaConsole
func NewIdeaConsole() Console {
return &ideaConsole{}
}

View File

@@ -19,7 +19,7 @@ type DefaultTemplate struct {
goFmt bool
}
// With returns a instance of DefaultTemplate
// With returns an instance of DefaultTemplate
func With(name string) *DefaultTemplate {
return &DefaultTemplate{
name: name,