all: small typo fixes (#2095)

This commit is contained in:
Alexander Melentyev
2021-11-01 18:47:06 +03:00
committed by GitHub
parent 681d03e896
commit 147b1f59ae
8 changed files with 10 additions and 10 deletions

View File

@@ -218,7 +218,7 @@ func Prefix(prefix uint) *IndexAnnotation {
}
}
// PrefixColumns returns a new index annotation with column prefix for
// PrefixColumn returns a new index annotation with column prefix for
// multi-column indexes. In MySQL, the following annotation maps to:
//
// index.Fields("c1", "c2", "c3").

View File

@@ -28,7 +28,7 @@ func RegisterTypeDecoder(typ string, dec jsoniter.ValDecoder) {
type registeredEncoder struct{ jsoniter.ValEncoder }
// EncoderOfNative returns a value encoder of a registered type.
// EncoderOfRegistered returns a value encoder of a registered type.
func (encodeExtension) EncoderOfRegistered(typ reflect2.Type) jsoniter.ValEncoder {
enc := typeEncoders[typ.String()]
if enc != nil {
@@ -58,7 +58,7 @@ func (encodeExtension) DecoratorOfRegistered(enc jsoniter.ValEncoder) jsoniter.V
type registeredDecoder struct{ jsoniter.ValDecoder }
// DecoratorOfRegistered returns a value decoder of a registered type.
// DecoderOfRegistered returns a value decoder of a registered type.
func (decodeExtension) DecoderOfRegistered(typ reflect2.Type) jsoniter.ValDecoder {
dec := typeDecoders[typ.String()]
if dec != nil {
@@ -79,7 +79,7 @@ func (decodeExtension) DecoderOfRegistered(typ reflect2.Type) jsoniter.ValDecode
return nil
}
// DecoratorOfNative decorates a value decoder of a registered type.
// DecoratorOfRegistered decorates a value decoder of a registered type.
func (decodeExtension) DecoratorOfRegistered(dec jsoniter.ValDecoder) jsoniter.ValDecoder {
if _, ok := dec.(registeredDecoder); ok {
return dec

View File

@@ -11,7 +11,7 @@ import (
// Mime defines a gremlin mime type.
type Mime []byte
// Graphson mime headers.
// GraphSON3Mime mime headers.
var (
GraphSON3Mime = NewMime("application/vnd.gremlin-v3.0+json")
)

View File

@@ -2426,7 +2426,7 @@ func (s *Selector) ForShare(opts ...LockOption) *Selector {
return s.For(LockShare, opts...)
}
// LockUpdate sets the lock configuration for suffixing the
// ForUpdate sets the lock configuration for suffixing the
// `SELECT` statement with the `FOR UPDATE` clause.
func (s *Selector) ForUpdate(opts ...LockOption) *Selector {
return s.For(LockUpdate, opts...)

View File

@@ -12,7 +12,7 @@ import (
"entgo.io/ent/dialect/sql"
)
// MigrateOption allows for managing schema configuration using functional options.
// InspectOption allows for managing schema configuration using functional options.
type InspectOption func(inspect *Inspector)
// WithSchema provides a schema (named-database) for reading the tables from.

View File

@@ -1264,7 +1264,7 @@ func (f Field) ConvertedToBasic() bool {
return !f.HasGoType() || f.BasicType("ident") != ""
}
// SupportsAdd reports if the field supports the mutation "Add(T) T" interface.
// SupportsMutationAdd reports if the field supports the mutation "Add(T) T" interface.
func (f Field) SupportsMutationAdd() bool {
if !f.Type.Numeric() || f.IsEdgeField() {
return false

View File

@@ -67,7 +67,7 @@ func (b *assocBuilder) StructTag(s string) *assocBuilder {
return b
}
// Assoc creates an inverse-edge with the same type.
// From creates an inverse-edge with the same type.
func (b *assocBuilder) From(name string) *inverseBuilder {
return &inverseBuilder{desc: &Descriptor{Name: name, Type: b.desc.Type, Inverse: true, Ref: b.desc}}
}

View File

@@ -123,7 +123,7 @@ func (t TypeInfo) ValueScanner() bool {
return t.RType.implements(valueScannerType)
}
// ValueScanner indicates if this type implements the driver.Valuer interface.
// Valuer indicates if this type implements the driver.Valuer interface.
func (t TypeInfo) Valuer() bool {
return t.RType.implements(valuerType)
}