Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Commit c09b596

Browse files
author
Huan Li
committed
TOOLS-2479: migration Mongoreplay code part 2
1 parent b5398b1 commit c09b596

File tree

185 files changed

+27189
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+27189
-222
lines changed

Diff for: CONTRIBUTING.md

-40
This file was deleted.

Diff for: README.md

+5-89

Diff for: build.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ ec=0
3333
echo "Building mongoreplay..."
3434
export GO111MODULE=on
3535
export GOSUMDB=off
36-
export GOFLAGS=-mod=vendor
37-
go build -o "bin/mongoreplay$BINARY_EXT" $(buildflags) -ldflags "$(print_ldflags)" -tags "$(print_tags $tags)" "main/mongoreplay.go" || { echo "Error building mongoreplay"; ec=1; break; }
36+
go build -o "bin/mongoreplay$BINARY_EXT" $(buildflags) -ldflags "$(print_ldflags)" -tags "$(print_tags $tags)" "main/mongoreplay.go" || { echo "Error building mongoreplay"; ec=1; }
3837
./bin/mongoreplay${BINARY_EXT} --version | head -1
3938

4039
if [ -t /dev/stdin ]; then

Diff for: go.mod

+13-5
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,28 @@ go 1.13
44

55
require (
66
github.com/10gen/escaper v0.0.0-20160802155924-17fe61c658dc
7-
github.com/10gen/llmgo v0.0.0-20180924181635-afcced55e92d
87
github.com/10gen/openssl v0.0.0-20190731121843-f50700cbcaf4
9-
github.com/golang/snappy v0.0.1 // indirect
8+
github.com/golang/snappy v0.0.1
109
github.com/google/gopacket v1.1.17
1110
github.com/howeyc/gopass v0.0.0-20190910152052-7cb4b85ec19c
1211
github.com/jessevdk/go-flags v1.4.0
1312
github.com/kr/pretty v0.2.0 // indirect
1413
github.com/patrickmn/go-cache v2.1.0+incompatible
1514
github.com/smartystreets/goconvey v1.6.4
1615
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
17-
github.com/xdg/stringprep v1.0.0 // indirect
16+
github.com/xdg/stringprep v1.0.0
1817
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
1918
golang.org/x/text v0.3.2 // indirect
20-
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
19+
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
2120
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
22-
gopkg.in/yaml.v2 v2.2.8 // indirect
21+
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
22+
gopkg.in/yaml.v2 v2.2.8
2323
)
24+
25+
replace github.com/10gen/mgo => github.com/10gen/mgo v0.0.0-20181212170345-8c133fd1d0fc
26+
27+
replace github.com/spacemonkeygo/spacelog => github.com/spacemonkeygo/spacelog v0.0.0-20160606222522-f936fb050dc6
28+
29+
replace github.com/golang/snappy => github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec
30+
31+
replace github.com/golang/text => github.com/golang/text v0.3.0

Diff for: go.sum

+13
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ github.com/10gen/escaper v0.0.0-20160802155924-17fe61c658dc h1:+OA/qWVLSp527f+7a
22
github.com/10gen/escaper v0.0.0-20160802155924-17fe61c658dc/go.mod h1:SSw09uAFAfvBsjSLvrXetmpr0shL+fnGNA+zWs+tLeU=
33
github.com/10gen/llmgo v0.0.0-20180924181635-afcced55e92d h1:i2BEOq9mhKdhHLFbT9M0K5bzTsafFvQkjtuAKPNHBKw=
44
github.com/10gen/llmgo v0.0.0-20180924181635-afcced55e92d/go.mod h1:zvfgi+6z+GLrRIRoi5vW6AwhOfzW5DvJeJt9s7a02mA=
5+
github.com/10gen/mgo v0.0.0-20181212170345-8c133fd1d0fc h1:DxM9R1MeYbIfHI3Yj8na4pB4liKB4NFN6H+rYWyOCOY=
6+
github.com/10gen/mgo v0.0.0-20181212170345-8c133fd1d0fc/go.mod h1:9Vj0S9y4hdrqDQHFpDUfm0gcLFD8Qleom/dVW8kxmwM=
57
github.com/10gen/openssl v0.0.0-20190731121843-f50700cbcaf4 h1:DBzFBQW+7jUsFMe+Eoyq8612aAFwCxq3ZhD31Janaas=
68
github.com/10gen/openssl v0.0.0-20190731121843-f50700cbcaf4/go.mod h1:ngIUcWisavS+ezq2tBEu6vgSU981hsiJaalWLlpOcuE=
9+
github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec h1:ZaSUjYC8aWT/om43c8YVz0SqjT8ABtqw7REbZGsCroE=
10+
github.com/golang/snappy v0.0.0-20160529050041-d9eb7a3d35ec/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
711
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
812
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
913
github.com/google/gopacket v1.1.17 h1:rMrlX2ZY2UbvT+sdz3+6J+pp2z+msCq9MxTU6ymxbBY=
@@ -16,22 +20,27 @@ github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGAR
1620
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
1721
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
1822
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
23+
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
1924
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
2025
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
26+
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
2127
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
2228
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
2329
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
2430
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
2531
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
2632
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
2733
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
34+
github.com/spacemonkeygo/spacelog v0.0.0-20160606222522-f936fb050dc6 h1:LnWP5yp3ITYJvtTn2ogLBm79ijSRLdznv5ChMrQx1dw=
35+
github.com/spacemonkeygo/spacelog v0.0.0-20160606222522-f936fb050dc6/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
2836
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=
2937
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
3038
github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0=
3139
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
3240
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
3341
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
3442
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
43+
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
3544
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
3645
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
3746
golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998=
@@ -42,7 +51,11 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
4251
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
4352
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
4453
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
54+
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
4555
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
4656
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=
4757
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
58+
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637 h1:yiW+nvdHb9LVqSHQBXfZCieqV4fzYhNBql77zY0ykqs=
59+
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637/go.mod h1:BHsqpu/nsuzkT5BpiH1EMZPLyqSMM8JbIavyFACoFNk=
60+
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
4861
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
File renamed without changes.
File renamed without changes.

Diff for: legacy/failpoint/failpoint_test.go renamed to internal/legacy/failpoint/failpoint_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
package failpoint
1010

1111
import (
12+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1213
"testing"
1314

14-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
1515
. "github.com/smartystreets/goconvey/convey"
1616
)
1717

File renamed without changes.

Diff for: legacy/json/bench_test.go renamed to internal/legacy/json/bench_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package json
1818
import (
1919
"bytes"
2020
"compress/gzip"
21-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
21+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
2222
"io/ioutil"
2323
"os"
2424
"testing"
File renamed without changes.

Diff for: legacy/json/bindata_test.go renamed to internal/legacy/json/bindata_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1212
. "github.com/smartystreets/goconvey/convey"
1313
"testing"
1414
)
File renamed without changes.

Diff for: legacy/json/boolean_test.go renamed to internal/legacy/json/boolean_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1212
. "github.com/smartystreets/goconvey/convey"
1313
"testing"
1414
)
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: legacy/json/date.go renamed to internal/legacy/json/date.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/util"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/util"
1212
"reflect"
1313
)
1414

Diff for: legacy/json/date_test.go renamed to internal/legacy/json/date_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1212
. "github.com/smartystreets/goconvey/convey"
1313
"testing"
1414
)
File renamed without changes.

Diff for: legacy/json/dbpointer_test.go renamed to internal/legacy/json/dbpointer_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1212
. "github.com/smartystreets/goconvey/convey"
1313
"gopkg.in/mgo.v2/bson"
1414
"testing"
File renamed without changes.

Diff for: legacy/json/dbref_test.go renamed to internal/legacy/json/dbref_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1212
. "github.com/smartystreets/goconvey/convey"
1313
"math"
1414
"testing"
File renamed without changes.

Diff for: legacy/json/decode_d_test.go renamed to internal/legacy/json/decode_d_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1212
. "github.com/smartystreets/goconvey/convey"
1313
"gopkg.in/mgo.v2/bson"
1414
"testing"

Diff for: legacy/json/decode_test.go renamed to internal/legacy/json/decode_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"bytes"
1414
"encoding"
1515
"fmt"
16-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
16+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1717
"image"
1818
"reflect"
1919
"strings"
File renamed without changes.

Diff for: legacy/json/encode_test.go renamed to internal/legacy/json/encode_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ package json
1111

1212
import (
1313
"bytes"
14+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1415
"math"
1516
"reflect"
1617
"testing"
1718
"unicode"
18-
19-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
2019
)
2120

2221
type Optionals struct {
File renamed without changes.

Diff for: legacy/json/float_test.go renamed to internal/legacy/json/float_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1212
. "github.com/smartystreets/goconvey/convey"
1313
"testing"
1414
)
File renamed without changes.

Diff for: legacy/json/fold_test.go renamed to internal/legacy/json/fold_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ package json
1111

1212
import (
1313
"bytes"
14-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
14+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1515
"strings"
1616
"testing"
1717
"unicode/utf8"

Diff for: legacy/json/frac_test.go renamed to internal/legacy/json/frac_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1212
. "github.com/smartystreets/goconvey/convey"
1313
"testing"
1414
)
File renamed without changes.
File renamed without changes.

Diff for: legacy/json/hex_test.go renamed to internal/legacy/json/hex_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1212
. "github.com/smartystreets/goconvey/convey"
1313
"testing"
1414
)
File renamed without changes.
File renamed without changes.

Diff for: legacy/json/infinity_test.go renamed to internal/legacy/json/infinity_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package json
88

99
import (
1010
"fmt"
11-
"github.com/mongodb-labs/mongoreplay/legacy/testtype"
11+
"github.com/mongodb-labs/mongoreplay/internal/legacy/testtype"
1212
. "github.com/smartystreets/goconvey/convey"
1313
"math"
1414
"testing"
File renamed without changes.

0 commit comments

Comments
 (0)