format go files (gofmt)

This commit is contained in:
2025-05-18 20:15:40 -04:00
parent 606e85d467
commit 5709bfd21d
13 changed files with 56 additions and 61 deletions

View File

@@ -42,4 +42,3 @@ func AllowContentType(contentTypes ...string) func(http.Handler) http.Handler {
}) })
} }
} }

View File

@@ -329,7 +329,7 @@ func compileMetadata(
keyspace.Functions[functions[i].Name] = &functions[i] keyspace.Functions[functions[i].Name] = &functions[i]
} }
keyspace.Aggregates = make(map[string]*AggregateMetadata, len(aggregates)) keyspace.Aggregates = make(map[string]*AggregateMetadata, len(aggregates))
for i, _ := range aggregates { for i := range aggregates {
aggregates[i].FinalFunc = *keyspace.Functions[aggregates[i].finalFunc] aggregates[i].FinalFunc = *keyspace.Functions[aggregates[i].finalFunc]
aggregates[i].StateFunc = *keyspace.Functions[aggregates[i].stateFunc] aggregates[i].StateFunc = *keyspace.Functions[aggregates[i].stateFunc]
keyspace.Aggregates[aggregates[i].Name] = &aggregates[i] keyspace.Aggregates[aggregates[i].Name] = &aggregates[i]
@@ -352,7 +352,7 @@ func compileMetadata(
keyspace.UserTypes[types[i].Name] = &types[i] keyspace.UserTypes[types[i].Name] = &types[i]
} }
keyspace.MaterializedViews = make(map[string]*MaterializedViewMetadata, len(materializedViews)) keyspace.MaterializedViews = make(map[string]*MaterializedViewMetadata, len(materializedViews))
for i, _ := range materializedViews { for i := range materializedViews {
materializedViews[i].BaseTable = keyspace.Tables[materializedViews[i].baseTableName] materializedViews[i].BaseTable = keyspace.Tables[materializedViews[i].baseTableName]
keyspace.MaterializedViews[materializedViews[i].Name] = &materializedViews[i] keyspace.MaterializedViews[materializedViews[i].Name] = &materializedViews[i]
} }

View File

@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build js
// +build js // +build js
package uuid package uuid

View File

@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build !js
// +build !js // +build !js
package uuid package uuid

View File

@@ -25,7 +25,6 @@ var jsonNull = []byte("null")
// } else { // } else {
// // NULL value // // NULL value
// } // }
//
type NullUUID struct { type NullUUID struct {
UUID UUID UUID UUID
Valid bool // Valid is true if UUID is not NULL Valid bool // Valid is true if UUID is not NULL

View File

@@ -187,10 +187,12 @@ func Must(uuid UUID, err error) UUID {
} }
// Validate returns an error if s is not a properly formatted UUID in one of the following formats: // Validate returns an error if s is not a properly formatted UUID in one of the following formats:
//
// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx // xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} // {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
//
// It returns an error if the format is invalid, otherwise nil. // It returns an error if the format is invalid, otherwise nil.
func Validate(s string) error { func Validate(s string) error {
switch len(s) { switch len(s) {

14
vendor/gopkg.in/inf.v0/dec.go generated vendored
View File

@@ -15,11 +15,10 @@
// - conversions to and from float32/64 types // - conversions to and from float32/64 types
// //
// Features considered for possible addition: // Features considered for possible addition:
// + formatting options // - formatting options
// + Exp method // - Exp method
// + combined operations such as AddRound/MulAdd etc // - combined operations such as AddRound/MulAdd etc
// + exchanging data in decimal32/64/128 formats // - exchanging data in decimal32/64/128 formats
//
package inf // import "gopkg.in/inf.v0" package inf // import "gopkg.in/inf.v0"
// TODO: // TODO:
@@ -79,7 +78,6 @@ import (
// QuoRound should be used with a Scale and a Rounder. // QuoRound should be used with a Scale and a Rounder.
// QuoExact or QuoRound with RoundExact can be used in the special cases when it // QuoExact or QuoRound with RoundExact can be used in the special cases when it
// is known that the result is always a finite decimal. // is known that the result is always a finite decimal.
//
type Dec struct { type Dec struct {
unscaled big.Int unscaled big.Int
scale Scale scale Scale
@@ -182,7 +180,6 @@ func (z *Dec) Set(x *Dec) *Dec {
// -1 if x < 0 // -1 if x < 0
// 0 if x == 0 // 0 if x == 0
// +1 if x > 0 // +1 if x > 0
//
func (x *Dec) Sign() int { func (x *Dec) Sign() int {
return x.UnscaledBig().Sign() return x.UnscaledBig().Sign()
} }
@@ -199,7 +196,6 @@ func (z *Dec) Neg(x *Dec) *Dec {
// -1 if x < y // -1 if x < y
// 0 if x == y // 0 if x == y
// +1 if x > y // +1 if x > y
//
func (x *Dec) Cmp(y *Dec) int { func (x *Dec) Cmp(y *Dec) int {
xx, yy := upscale(x, y) xx, yy := upscale(x, y)
return xx.UnscaledBig().Cmp(yy.UnscaledBig()) return xx.UnscaledBig().Cmp(yy.UnscaledBig())
@@ -252,7 +248,6 @@ func (z *Dec) Round(x *Dec, s Scale, r Rounder) *Dec {
// //
// There is no corresponding Div method; the equivalent can be achieved through // There is no corresponding Div method; the equivalent can be achieved through
// the choice of Rounder used. // the choice of Rounder used.
//
func (z *Dec) QuoRound(x, y *Dec, s Scale, r Rounder) *Dec { func (z *Dec) QuoRound(x, y *Dec, s Scale, r Rounder) *Dec {
return z.quo(x, y, sclr{s}, r) return z.quo(x, y, sclr{s}, r)
} }
@@ -293,7 +288,6 @@ func (z *Dec) QuoExact(x, y *Dec) *Dec {
// x / y = z + (remNum/remDen) * 10**(-z.Scale()) // x / y = z + (remNum/remDen) * 10**(-z.Scale())
// //
// See Rounder for more details about rounding. // See Rounder for more details about rounding.
//
func (z *Dec) quoRem(x, y *Dec, s Scale, useRem bool, func (z *Dec) quoRem(x, y *Dec, s Scale, useRem bool,
remNum, remDen *big.Int) (*Dec, *big.Int, *big.Int) { remNum, remDen *big.Int) (*Dec, *big.Int, *big.Int) {
// difference (required adjustment) compared to "canonical" result scale // difference (required adjustment) compared to "canonical" result scale

1
vendor/gopkg.in/inf.v0/rounder.go generated vendored
View File

@@ -9,7 +9,6 @@ import (
// Dec.Quo(). // Dec.Quo().
// //
// See the Example for results of using each Rounder with some sample values. // See the Example for results of using each Rounder with some sample values.
//
type Rounder rounder type Rounder rounder
// See http://speleotrove.com/decimal/damodel.html#refround for more detailed // See http://speleotrove.com/decimal/damodel.html#refround for more detailed