Skip to content

Commit

Permalink
Rename bson2 to bson (#4179)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi committed Mar 13, 2024
1 parent 365a3dd commit 64bd8ca
Show file tree
Hide file tree
Showing 66 changed files with 193 additions and 193 deletions.
10 changes: 5 additions & 5 deletions .golangci.yml
Expand Up @@ -29,21 +29,21 @@ linters-settings:
oldbson:
files:
- $all
- "!**/internal/bson2/bson2_test.go"
- "!**/internal/bson/bson_test.go"
deny:
- pkg: github.com/FerretDB/FerretDB/internal/bson/oldbson$
bson2:
bson:
files:
- $all
- "!**/internal/bson2/*_test.go"
- "!**/internal/bson/*_test.go"
- "!**/internal/util/testutil/*.go"
- "!**/internal/wire/*.go"
deny:
- pkg: github.com/FerretDB/FerretDB/internal/bson2
- pkg: github.com/FerretDB/FerretDB/internal/bson
bsonproto:
files:
- $all
- "!**/internal/bson2/*.go"
- "!**/internal/bson/*.go"
deny:
- pkg: github.com/cristalhq/bson
- pkg: github.com/cristalhq/bson/bsonproto
Expand Down
4 changes: 2 additions & 2 deletions Taskfile.yml
Expand Up @@ -324,7 +324,7 @@ tasks:
desc: "Run unit benchmarks"
cmds:
- go test -list='Benchmark.*' ./...
- go test -count=10 -bench=BenchmarkDocument -benchtime={{.BENCH_TIME}} ./internal/bson2/ | tee -a new.txt
- go test -count=10 -bench=BenchmarkDocument -benchtime={{.BENCH_TIME}} ./internal/bson/ | tee -a new.txt
- bin/benchstat{{exeExt}} old.txt new.txt

# That's not quite correct: https://github.com/golang/go/issues/15513
Expand All @@ -338,7 +338,7 @@ tasks:
desc: "Fuzz for about 1 minute (with default FUZZ_TIME)"
cmds:
- go test -list='Fuzz.*' ./...
- go test -run=XXX -fuzz=FuzzDocument -fuzztime={{.FUZZ_TIME}} ./internal/bson2/
- go test -run=XXX -fuzz=FuzzDocument -fuzztime={{.FUZZ_TIME}} ./internal/bson/
- go test -run=XXX -fuzz=FuzzMsg -fuzztime={{.FUZZ_TIME}} ./internal/wire/
- go test -run=XXX -fuzz=FuzzQuery -fuzztime={{.FUZZ_TIME}} ./internal/wire/
- go test -run=XXX -fuzz=FuzzReply -fuzztime={{.FUZZ_TIME}} ./internal/wire/
Expand Down
2 changes: 1 addition & 1 deletion internal/bson2/array.go → internal/bson/array.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package bson2
package bson

import (
"bytes"
Expand Down
18 changes: 9 additions & 9 deletions internal/bson2/bson2.go → internal/bson/bson.go
Expand Up @@ -12,32 +12,32 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package bson2 implements encoding and decoding of BSON as defined by https://bsonspec.org/spec.html.
// Package bson implements encoding and decoding of BSON as defined by https://bsonspec.org/spec.html.
//
// # Types
//
// The following BSON types are supported:
//
// BSON Go
//
// Document/Object *bson2.Document or bson2.RawDocument
// Array *bson2.Array or bson2.RawArray
// Document/Object *bson.Document or bson.RawDocument
// Array *bson.Array or bson.RawArray
//
// Double float64
// String string
// Binary data bson2.Binary
// ObjectId bson2.ObjectID
// Binary data bson.Binary
// ObjectId bson.ObjectID
// Boolean bool
// Date time.Time
// Null bson2.NullType
// Regular Expression bson2.Regex
// Null bson.NullType
// Regular Expression bson.Regex
// 32-bit integer int32
// Timestamp bson2.Timestamp
// Timestamp bson.Timestamp
// 64-bit integer int64
//
// Composite types (Document and Array) are passed by pointers.
// Raw composite type and scalars are passed by values.
package bson2
package bson

import (
"fmt"
Expand Down

0 comments on commit 64bd8ca

Please sign in to comment.