Skip to content

Commit 8e88825

Browse files
authored
Tidy build constraints in mathutil (pingcap#14257)
- Rename *_js.go to *_wasm.go to satisfy both wasm/js and wasm/wasi - Use +build instruction instead of *_GOOS pattern to reduce file Signed-off-by: lucklove <[email protected]>
1 parent 05596fe commit 8e88825

File tree

7 files changed

+6
-114
lines changed

7 files changed

+6
-114
lines changed

executor/explain.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ package executor
1616
import (
1717
"context"
1818

19-
"github.com/cznic/mathutil"
2019
"github.com/pingcap/errors"
2120
"github.com/pingcap/tidb/planner/core"
2221
"github.com/pingcap/tidb/util/chunk"
22+
"github.com/pingcap/tidb/util/mathutil"
2323
)
2424

2525
// ExplainExec represents an explain executor.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ require (
3434
github.com/pingcap/errors v0.11.5-0.20190809092503-95897b64e011
3535
github.com/pingcap/failpoint v0.0.0-20191029060244-12f4ac2fd11d
3636
github.com/pingcap/fn v0.0.0-20191016082858-07623b84a47d
37-
github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e
37+
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989
3838
github.com/pingcap/kvproto v0.0.0-20191217072959-393e6c0fd4b7
3939
github.com/pingcap/log v0.0.0-20191012051959-b742a5d432e9
4040
github.com/pingcap/parser v0.0.0-20191223023445-b93660cf3e4e

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ github.com/pingcap/fn v0.0.0-20191016082858-07623b84a47d h1:rCmRK0lCRrHMUbS99BKF
195195
github.com/pingcap/fn v0.0.0-20191016082858-07623b84a47d/go.mod h1:fMRU1BA1y+r89AxUoaAar4JjrhUkVDt0o0Np6V8XbDQ=
196196
github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e h1:P73/4dPCL96rGrobssy1nVy2VaVpNCuLpCbr+FEaTA8=
197197
github.com/pingcap/goleveldb v0.0.0-20171020122428-b9ff6c35079e/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw=
198+
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989 h1:surzm05a8C9dN8dIUmo4Be2+pMRb6f55i+UIYrluu2E=
199+
github.com/pingcap/goleveldb v0.0.0-20191226122134-f82aafb29989/go.mod h1:O17XtbryoCJhkKGbT62+L2OlrniwqiGLSqrmdHCMzZw=
198200
github.com/pingcap/kvproto v0.0.0-20191211054548-3c6b38ea5107 h1:IXAs9fKFQZJVHf9cXWfUh8Nq8zPO9ihgPgNuU1j7bIo=
199201
github.com/pingcap/kvproto v0.0.0-20191211054548-3c6b38ea5107/go.mod h1:WWLmULLO7l8IOcQG+t+ItJ3fEcrL5FxF0Wu+HrMy26w=
200202
github.com/pingcap/kvproto v0.0.0-20191213111810-93cb7c623c8b/go.mod h1:WWLmULLO7l8IOcQG+t+ItJ3fEcrL5FxF0Wu+HrMy26w=

util/mathutil/mathutil_darwin.go util/mathutil/mathutil.go

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
// distributed under the License is distributed on an "AS IS" BASIS,
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
13+
//
14+
// +build darwin linux windows
1315

1416
package mathutil
1517

util/mathutil/mathutil_linux.go

-56
This file was deleted.
File renamed without changes.

util/mathutil/mathutil_windows.go

-56
This file was deleted.

0 commit comments

Comments
 (0)