From 175341feeb3108e939ad73d2ee06f2cb974a18bf Mon Sep 17 00:00:00 2001 From: reltuk Date: Mon, 4 Apr 2022 20:36:29 +0000 Subject: [PATCH] [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh --- go/store/cmd/noms/commit_iterator.go | 14 +++++++------- go/store/datas/commit.go | 2 +- go/store/types/ref.go | 2 +- go/store/types/serial_message.go | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/go/store/cmd/noms/commit_iterator.go b/go/store/cmd/noms/commit_iterator.go index a9d6b502e1..c95a089d98 100644 --- a/go/store/cmd/noms/commit_iterator.go +++ b/go/store/cmd/noms/commit_iterator.go @@ -106,13 +106,13 @@ func (iter *CommitIterator) Next(ctx context.Context) (LogNode, bool) { type LogNode struct { addr hash.Hash height uint64 - commit types.Value // commit that needs to be printed - startingColCount int // how many branches are being tracked when this commit is printed - endingColCount int // home many branches will be tracked when next commit is printed - col int // col to put the '*' character in graph - newCols []int // col to start using '\' in graph - foldedCols []int // cols with common ancestors, that will get folded together - lastCommit bool // this is the last commit that will be returned by iterator + commit types.Value // commit that needs to be printed + startingColCount int // how many branches are being tracked when this commit is printed + endingColCount int // home many branches will be tracked when next commit is printed + col int // col to put the '*' character in graph + newCols []int // col to start using '\' in graph + foldedCols []int // cols with common ancestors, that will get folded together + lastCommit bool // this is the last commit that will be returned by iterator } func (n LogNode) String() string { diff --git a/go/store/datas/commit.go b/go/store/datas/commit.go index be63c634ae..6395026472 100644 --- a/go/store/datas/commit.go +++ b/go/store/datas/commit.go @@ -170,7 +170,7 @@ func commit_flatbuffer(vaddr hash.Hash, opts CommitOptions, heights []uint64) ([ serial.CommitAddTimestampMillis(builder, opts.Meta.Timestamp) serial.CommitAddUserTimestampMillis(builder, opts.Meta.UserTimestamp) builder.FinishWithFileIdentifier(serial.CommitEnd(builder), []byte(serial.CommitFileID)) - return builder.FinishedBytes(), maxheight+1 + return builder.FinishedBytes(), maxheight + 1 } func newCommitForValue(ctx context.Context, vrw types.ValueReadWriter, v types.Value, opts CommitOptions) (*Commit, error) { diff --git a/go/store/types/ref.go b/go/store/types/ref.go index 9be2a68a65..b2ddb6a5c3 100644 --- a/go/store/types/ref.go +++ b/go/store/types/ref.go @@ -238,7 +238,7 @@ func WalkAddrsForChunkStore(cs chunks.ChunkStore) (func(chunks.Chunk, func(h has return WalkAddrsForNBF(nbf), nil } -func WalkAddrsForNBF(nbf *NomsBinFormat) (func(chunks.Chunk, func(h hash.Hash, isleaf bool) error) error) { +func WalkAddrsForNBF(nbf *NomsBinFormat) func(chunks.Chunk, func(h hash.Hash, isleaf bool) error) error { return func(c chunks.Chunk, cb func(h hash.Hash, isleaf bool) error) error { return walkRefs(c.Data(), nbf, func(r Ref) error { return cb(r.TargetHash(), r.Height() == 1) diff --git a/go/store/types/serial_message.go b/go/store/types/serial_message.go index 4fac6e5c5d..421096637d 100644 --- a/go/store/types/serial_message.go +++ b/go/store/types/serial_message.go @@ -166,7 +166,7 @@ func (sm SerialMessage) walkRefs(nbf *NomsBinFormat, cb RefCallback) error { func SerialCommitParentRefs(nbf *NomsBinFormat, sm SerialMessage) ([]Ref, error) { msg := serial.GetRootAsCommit([]byte(sm), 0) addrs := msg.ParentAddrsBytes() - n := len(addrs)/20 + n := len(addrs) / 20 ret := make([]Ref, n) for i := 0; i < n; i++ { addr := hash.New(addrs[:20])