all: fix linting errors for comments (#990)

* fix: linting errors for comments

* fix: one more comment
This commit is contained in:
Nathaniel Peiffer
2020-11-27 16:02:18 +11:00
committed by GitHub
parent ac8e8dac83
commit 42fa731f39
8 changed files with 26 additions and 23 deletions

View File

@@ -57,20 +57,20 @@ type FeatureStage int
const (
_ FeatureStage = iota
// An Experimental feature is one that is in development,
// and it's actively tested in the integration environment.
// Experimental features are in development, and actively being tested in the
// integration environment.
Experimental
// An Alpha feature is one that its initial development was
// finished, it's tested on the infra of the ent team, but
// we expect breaking-changes to its API.
// Alpha features are features whose initial development was finished, tested
// on the infra of the ent team, but we expect breaking-changes to their APIs.
Alpha
// A Beta feature is an Alpha feature that was added to the entgo.io
// documentation, and no breaking-changes are expected for it.
// Beta features are Alpha features that were added to the entgo.io
// documentation, and no breaking-changes are expected for them.
Beta
// A Stable feature is a Beta feature that was running a while on ent infra.
// Stable features are Beta features that were running for a while on ent
// infra.
Stable
)

View File

@@ -494,7 +494,7 @@ type Snapshot struct {
Features []string
}
// MarshalSchema returns a JSON string represents the graph schema in loadable format.
// SchemaSnapshot returns a JSON string represents the graph schema in loadable format.
func (g *Graph) SchemaSnapshot() (string, error) {
schemas := make([]*load.Schema, len(g.Nodes))
for i := range g.Nodes {

View File

@@ -579,7 +579,7 @@ func (t Type) CreateName() string {
return pascal(t.Name) + "Create"
}
// CreateBulk returns the struct name denoting the create-bulk-builder for this type.
// CreateBulkName returns the struct name denoting the create-bulk-builder for this type.
func (t Type) CreateBulkName() string {
return pascal(t.Name) + "CreateBulk"
}
@@ -641,7 +641,7 @@ func (t Type) HookPositions() []*load.Position {
return nil
}
// NumHooks returns the number of privacy-policy declared in the type schema.
// NumPolicy returns the number of privacy-policy declared in the type schema.
func (t Type) NumPolicy() int {
if t.schema != nil {
return len(t.schema.Policy)
@@ -736,7 +736,7 @@ func (f Field) StructField() string {
return pascal(f.Name)
}
// Enums returns the enum values of a field.
// EnumNames returns the enum values of a field.
func (f Field) EnumNames() []string {
names := make([]string, 0, len(f.def.Enums))
for _, e := range f.Enums {
@@ -1081,7 +1081,7 @@ func (e Edge) O2O() bool { return e.Rel.Type == O2O }
// IsInverse returns if this edge is an inverse edge.
func (e Edge) IsInverse() bool { return e.Inverse != "" }
// Constant returns the constant name of the edge for the gremlin dialect.
// LabelConstant returns the constant name of the edge for the gremlin dialect.
// If the edge is inverse, it returns the constant name of the owner-edge (assoc-edge).
func (e Edge) LabelConstant() string {
name := e.Name
@@ -1091,7 +1091,7 @@ func (e Edge) LabelConstant() string {
return pascal(name) + "Label"
}
// InverseConstant returns the inverse constant name of the edge.
// InverseLabelConstant returns the inverse constant name of the edge.
func (e Edge) InverseLabelConstant() string { return pascal(e.Name) + "InverseLabel" }
// TableConstant returns the constant name of the relation table.