Skip to content

Commit

Permalink
Merge stringers
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi committed Jul 15, 2024
1 parent dcaa608 commit 4770fbe
Show file tree
Hide file tree
Showing 14 changed files with 176 additions and 208 deletions.
2 changes: 0 additions & 2 deletions msg_header.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import (
"github.com/FerretDB/wire/internal/util/lazyerrors"
)

//go:generate go run golang.org/x/tools/cmd/stringer@latest -linecomment -type OpCode

// OpCode represents wire operation code.
type OpCode int32

Expand Down
2 changes: 0 additions & 2 deletions op_msg_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ package wire

import "fmt"

//go:generate go run golang.org/x/tools/cmd/stringer@latest -linecomment -type OpMsgFlagBit

// OpMsgFlagBit integer is a bitmask encoding flags that modify the format and behavior of OpMsg.
type OpMsgFlagBit flagBit

Expand Down
2 changes: 0 additions & 2 deletions op_query_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ package wire

import "fmt"

//go:generate go run golang.org/x/tools/cmd/stringer@latest -linecomment -type OpQueryFlagBit

// OpQueryFlagBit an integer bitmask for the operation.
type OpQueryFlagBit flagBit

Expand Down
2 changes: 0 additions & 2 deletions op_reply_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ package wire

import "fmt"

//go:generate go run golang.org/x/tools/cmd/stringer@latest -linecomment -type OpReplyFlagBit

// OpReplyFlagBit is a bit vector to specify OP_REPLY flags.
type OpReplyFlagBit flagBit

Expand Down
47 changes: 0 additions & 47 deletions opcode_string.go

This file was deleted.

35 changes: 0 additions & 35 deletions opmsgflagbit_string.go

This file was deleted.

49 changes: 0 additions & 49 deletions opqueryflagbit_string.go

This file was deleted.

39 changes: 0 additions & 39 deletions opreplyflagbit_string.go

This file was deleted.

152 changes: 152 additions & 0 deletions stringers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@
// Package wire provides wire protocol implementation.
package wire

//go:generate go run golang.org/x/tools/cmd/stringer@latest -linecomment -output stringers.go -type OpCode,OpMsgFlagBit,OpQueryFlagBit,OpReplyFlagBit

const debugbuild = true
4 changes: 2 additions & 2 deletions wirebson/bson.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ import (
"github.com/FerretDB/wire/internal/util/lazyerrors"
)

//go:generate go run golang.org/x/tools/cmd/stringer@latest -linecomment -output stringers.go -type decodeMode,tag

type (
// ScalarType represents a BSON scalar type.
//
Expand Down Expand Up @@ -105,8 +107,6 @@ const (
// Null represents BSON scalar value null.
var Null = bsonproto.Null

//go:generate go run golang.org/x/tools/cmd/stringer@latest -linecomment -type decodeMode

// decodeMode represents a mode for decoding BSON.
type decodeMode int

Expand Down
Loading

0 comments on commit 4770fbe

Please sign in to comment.