all: reformat comments as required by gofmt 1.19

I don't know why the go people thought this was a good idea, because
this automatic reformatting is bound to do the wrong thing sometimes,
which is very annoying. But I don't see a way to turn it off, so best to
get this change out of the way.

Change-Id: Ib5dbbca6a6f6fc944d76c9b511b8c904f796e4f3
This commit is contained in:
paul cannon 2022-08-10 10:35:58 -05:00 committed by Storj Robot
parent 0550731598
commit 37a4edbaff
16 changed files with 134 additions and 138 deletions

View File

@ -18,6 +18,7 @@ var initialized = false
const padding = 2
// Point is a 2D coordinate in console.
//
// X is the column
// Y is the row
type Point struct{ X, Y int }

View File

@ -6,8 +6,7 @@
// testplanet provides access to most of the internals of satellites,
// storagenodes and uplinks.
//
//
// Database
// # Database
//
// It does require setting two variables for the databases:
//
@ -19,15 +18,13 @@
// STORJ_TEST_POSTGRES=omit
// STORJ_TEST_COCKROACH=omit
//
//
// Host
// # Host
//
// It's possible to change the listing host with:
//
// STORJ_TEST_HOST=127.0.0.2;127.0.0.3
//
//
// Debugging
// # Debugging
//
// For debugging, it's possible to set STORJ_TEST_MONKIT to get a trace per test.
//

View File

@ -13,6 +13,7 @@ import (
// TotalAmounts holds the amounts held and disposed.
//
// Invariants:
//
// TotalHeld >= TotalDisposed
// TotalPaid >= TotalDisposed
// TotalPaid >= TotalDistributed (we may distribute less due to minimum payout threshold)

View File

@ -25,8 +25,8 @@ type Object RawObject
// IsMigrated returns whether the object comes from PointerDB.
// Pointer objects are special that they are missing some information.
//
// * TotalPlainSize = 0 and FixedSegmentSize = 0.
// * Segment.PlainOffset = 0, Segment.PlainSize = 0
// - TotalPlainSize = 0 and FixedSegmentSize = 0.
// - Segment.PlainOffset = 0, Segment.PlainSize = 0
func (obj *Object) IsMigrated() bool {
return obj.TotalPlainSize <= 0
}

View File

@ -25,7 +25,6 @@ func UpdateReputation(isSuccess bool, alpha, beta, lambda, w float64) (newAlpha,
// With the arguments as named, applies 'count' successful audits. To apply negative
// audits, swap the alpha and beta parameters and return values.
//
//
// WARNING: GREEK LETTER MATH AHEAD
//
// Applying n successful audit results to an initial alpha value of α₀ gives a
@ -52,7 +51,6 @@ func UpdateReputation(isSuccess bool, alpha, beta, lambda, w float64) (newAlpha,
// For n _successes_,
//
// β₁ = λⁿβ₀
//
func UpdateReputationMultiple(count int, alpha, beta, lambda, w float64) (newAlpha, newBeta float64) {
if lambda == 1 {
// special case: when the coefficient is 1, the closed-form formula is invalid

View File

@ -231,7 +231,6 @@ func nodeSelectionCondition(ctx context.Context, criteria *overlay.NodeCriteria,
// distinct=true
//
// SELECT * FROM ($selection WHERE $condition ORDER BY $orderBy, RANDOM()) filtered ORDER BY RANDOM() LIMIT $limit
//
type partialQuery struct {
selection string
condition condition

View File

@ -728,11 +728,11 @@ func (db *ProjectAccounting) getSingleBucketRollup(ctx context.Context, projectI
// bytes), returns false for ok.
//
// examples: prefixIncrement([]byte("abc")) -> ([]byte("abd", true)
//
// prefixIncrement([]byte("ab\xff\xff")) -> ([]byte("ac", true)
// prefixIncrement([]byte("")) -> (nil, false)
// prefixIncrement([]byte("\x00")) -> ([]byte("\x01", true)
// prefixIncrement([]byte("\xff\xff\xff")) -> (nil, false)
//
func prefixIncrement(origPrefix []byte) (incremented []byte, ok bool) {
incremented = make([]byte, len(origPrefix))
copy(incremented, origPrefix)

View File

@ -45,7 +45,7 @@ func (reputations *reputations) Update(ctx context.Context, updateReq reputation
// the need for an explicit transaction.
// There are three main steps go into the update process:
// 1. Get existing row for the node
// a. if no row found, insert a new row.
// (if no row found, insert a new row).
// 2. Evaluate what the new values for the row fields should be.
// 3. Update row using compare-and-swap.
//