Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dialect/entsql/annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type Annotation struct {
//
Size int64 `json:"size,omitempty"`

// Incremental defines the autoincremental behavior of a column. For example:
// Incremental defines the auto-incremental behavior of a column. For example:
//
// incrementalEnabled := true
// entsql.Annotation{
Expand Down Expand Up @@ -190,7 +190,7 @@ type IndexAnnotation struct {
//
Prefix uint

// PrefixColumns defines column prefixes for a multi column index.
// PrefixColumns defines column prefixes for a multi-column index.
// In MySQL, the following annotation maps to:
//
// index.Fields("c1", "c2", "c3").
Expand Down
12 changes: 6 additions & 6 deletions ent.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type (
Indexes() []Index
// Config returns an optional config for the schema.
//
// Deprecated: the Config method predates the Annotations method and it
// Deprecated: the Config method predates the Annotations method, and it
// is planned be removed in v0.5.0. New code should use Annotations instead.
//
// func (T) Annotations() []schema.Annotation {
Expand Down Expand Up @@ -83,7 +83,7 @@ type (
Descriptor() *field.Descriptor
}

// A Edge interface returns an edge descriptor for vertex edges.
// An Edge interface returns an edge descriptor for vertex edges.
// The usage for the interface is as follows:
//
// func (T) Edges() []ent.Edge {
Expand All @@ -96,7 +96,7 @@ type (
Descriptor() *edge.Descriptor
}

// A Index interface returns an index descriptor for vertex indexes.
// An Index interface returns an index descriptor for vertex indexes.
// The usage for the interface is as follows:
//
// func (T) Indexes() []ent.Index {
Expand Down Expand Up @@ -271,7 +271,7 @@ type (
// ClearedFields returns all nullable fields that were cleared
// during this mutation.
ClearedFields() []string
// FieldCleared returns a boolean indicates if this field was
// FieldCleared returns a bool indicates if this field was
// cleared in this mutation.
FieldCleared(name string) bool
// ClearField clears the value for the given name. It returns an
Expand Down Expand Up @@ -300,7 +300,7 @@ type (
// ClearedEdges returns all edge names that were cleared in this
// mutation.
ClearedEdges() []string
// EdgeCleared returns a boolean indicates if this edge was
// EdgeCleared returns a bool indicates if this edge was
// cleared in this mutation.
EdgeCleared(name string) bool
// ClearEdge clears the value for the given name. It returns an
Expand Down Expand Up @@ -356,7 +356,7 @@ const (
OpUpdate // update nodes by predicate (if any).
OpUpdateOne // update one node.
OpDelete // delete nodes by predicate (if any).
OpDeleteOne // delete one one.
OpDeleteOne // delete one node.
)

// Is reports whether o is match the given operation.
Expand Down
1 change: 1 addition & 0 deletions entc/load/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"time"

"entgo.io/ent"

"golang.org/x/tools/go/packages"
)

Expand Down
73 changes: 0 additions & 73 deletions go.sum

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions privacy/privacy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"entgo.io/ent"
"entgo.io/ent/privacy"

"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion schema/edge/annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package edge
import "entgo.io/ent/schema"

// Annotation is a builtin schema annotation for
// configuring the edges behavior in codegen.
// configuring the edges' behavior in codegen.
type Annotation struct {
// The StructTag option allows overriding the struct-tag
// of the `Edges` field in the generated entity. For example:
Expand Down
4 changes: 2 additions & 2 deletions schema/field/annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type Annotation struct {
//
// field.Annotation{
// StructTag: map[string]string{
// "id": `json:"id,omitempty" yaml:"-"`
// }
// "id": `json:"id,omitempty" yaml:"-"`,
// },
// }
//
StructTag map[string]string
Expand Down
4 changes: 2 additions & 2 deletions schema/field/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func String(name string) *stringBuilder {
}

// Text returns a new string field without limitation on the size.
// In MySQL, it is the "longtext" type, but in SQLite and Gremlin it has not effect.
// In MySQL, it is the "longtext" type, but in SQLite and Gremlin it has no effect.
func Text(name string) *stringBuilder {
return &stringBuilder{&Descriptor{
Name: name,
Expand Down Expand Up @@ -892,7 +892,7 @@ func (b *enumBuilder) GoType(ev EnumValues) *enumBuilder {
b.Values(ev.Values()...)
b.desc.goType(ev, stringType)
// If an error already exists, let that be returned instead.
// Otherwise check that the underlying type is either a string
// Otherwise, check that the underlying type is either a string
// or implements Stringer.
if b.desc.Err == nil && b.desc.Info.RType.rtype.Kind() != reflect.String && !b.desc.Info.Stringer() {
b.desc.Err = errors.New("enum values which implement ValueScanner must also implement Stringer")
Expand Down
2 changes: 1 addition & 1 deletion schema/field/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (t Type) Valid() bool {
return t > TypeInvalid && t < endTypes
}

// ConstName returns the constant name of a info type.
// ConstName returns the constant name of an info type.
// It's used by entc for printing the constant name in templates.
func (t Type) ConstName() string {
switch {
Expand Down