Skip to content

Commit

Permalink
Run gofmt simplify to fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jschaf committed Jun 17, 2023
1 parent 4272ee3 commit 85a8613
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions internal/codegen/golang/gotype/known_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func FindKnownTypeNonNullable(oid pgtype.OID) (Type, bool) {
}

// Native go types are not prefixed.
//
//goland:noinspection GoUnusedGlobalVariable
var (
Bool = MustParseKnownType("bool", pg.Bool)
Expand Down
4 changes: 2 additions & 2 deletions internal/codegen/golang/templated_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ func (tq TemplatedQuery) EmitResultElem() (string, error) {
// for :one queries or to append for :many queries. Useful for figuring out if
// we need to use the address operator. Controls the string item and &item in:
//
// items = append(items, item)
// items = append(items, &item)
// items = append(items, item)
// items = append(items, &item)
func (tq TemplatedQuery) EmitResultExpr(name string) (string, error) {
switch tq.ResultKind {
case ast.ResultKindOne:
Expand Down
8 changes: 4 additions & 4 deletions internal/errs/errs.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
// original err by wrapping in a MultiError if err is non-nil. If msg is not
// empty, wrap the error returned by closer with the msg.
//
// - If errF returns nil, do nothing.
// - If errF returns an error and *err == nil, replace *err with the error.
// - If errF returns an error and *err != nil, replace *err with a MultiError
// containing *err and the errF err.
// - If errF returns nil, do nothing.
// - If errF returns an error and *err == nil, replace *err with the error.
// - If errF returns an error and *err != nil, replace *err with a MultiError
// containing *err and the errF err.
func Capture(err *error, errF func() error, msg string) {
fErr := errF()
if fErr == nil {
Expand Down
2 changes: 2 additions & 0 deletions internal/pg/known_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
)

// If you add to this list, also add to defaultKnownTypes below.
//
//goland:noinspection GoNameStartsWithPackageName
var (
Bool = BaseType{ID: pgtype.BoolOID, Name: "bool"}
Bytea = BaseType{ID: pgtype.ByteaOID, Name: "bytea"}
Expand Down
1 change: 1 addition & 0 deletions internal/texts/dedent.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
// - If the line only has whitespace, replace it with a single newline.
// - If the line has non-whitespace chars, find the common whitespace prefix
// of all such lines.
//
// - Remove the common whitespace prefix from each line.
func Dedent(text string) string {
indent := math.MaxInt32
Expand Down

0 comments on commit 85a8613

Please sign in to comment.