chore: gofumpt (#11839)

* fumpt using main not master...

* be more descriptive

* fumpt

* fix nits

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Jacob Gadikian
2022-05-19 10:55:27 +02:00
committed by GitHub
co-authored by Julien Robert
parent bc2d553f77
commit 55054282d2
412 changed files with 1020 additions and 1059 deletions
-1
View File
@@ -6,7 +6,6 @@ import "google.golang.org/protobuf/reflect/protoreflect"
// kv-store backing an ORM instance. EntryCodec's enable full logical decoding
// of ORM data.
type EntryCodec interface {
// DecodeEntry decodes a kv-pair into an Entry.
DecodeEntry(k, v []byte) (Entry, error)
-4
View File
@@ -26,7 +26,6 @@ type Entry interface {
// PrimaryKeyEntry represents a logically decoded primary-key entry.
type PrimaryKeyEntry struct {
// TableName is the table this entry represents.
TableName protoreflect.FullName
@@ -71,7 +70,6 @@ func (p *PrimaryKeyEntry) doNotImplement() {}
// IndexKeyEntry represents a logically decoded index entry.
type IndexKeyEntry struct {
// TableName is the table this entry represents.
TableName protoreflect.FullName
@@ -111,14 +109,12 @@ func (i *IndexKeyEntry) String() string {
if i.IsUnique {
return fmt.Sprintf("UNIQ %s", i.string())
} else {
return fmt.Sprintf("IDX %s", i.string())
}
}
// SeqEntry represents a sequence for tables with auto-incrementing primary keys.
type SeqEntry struct {
// TableName is the table this entry represents.
TableName protoreflect.FullName
-1
View File
@@ -62,7 +62,6 @@ func NewIndexKeyCodec(prefix []byte, messageType protoreflect.MessageType, index
}
func (cdc IndexKeyCodec) DecodeIndexKey(k, _ []byte) (indexFields, primaryKey []protoreflect.Value, err error) {
values, err := cdc.DecodeKey(bytes.NewReader(k))
// got prefix key
if err == io.EOF {
-1
View File
@@ -51,7 +51,6 @@ func (p PrimaryKeyCodec) DecodeIndexKey(k, _ []byte) (indexFields, primaryKey []
primaryKey = indexFields
}
return indexFields, primaryKey, nil
}
func (p PrimaryKeyCodec) DecodeEntry(k, v []byte) (Entry, error) {