Skip to content

Commit

Permalink
fix: remove go1.16 support
Browse files Browse the repository at this point in the history
  • Loading branch information
liuq19 committed Jun 3, 2024
1 parent a08d0cc commit 2507bb8
Show file tree
Hide file tree
Showing 25 changed files with 28 additions and 2,876 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit_test-linux-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x]
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x]
runs-on: [arm]
steps:
- name: Clear repository
Expand Down
1 change: 1 addition & 0 deletions ast/api.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (amd64 && go1.17 && !go1.23) || (arm64 && go1.20 && !go1.23)
// +build amd64,go1.17,!go1.23 arm64,go1.20,!go1.23

/*
Expand Down
2 changes: 1 addition & 1 deletion ast/api_compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

func init() {
println("WARNING:(ast) sonic only supports Go1.16~1.22, but your environment is not suitable")
println("WARNING:(ast) sonic only supports go1.17~1.22, but your environment is not suitable")
}

func quote(buf *[]byte, val string) {
Expand Down
1 change: 1 addition & 0 deletions ast/api_native_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (amd64 && go1.17 && !go1.23) || (arm64 && go1.20 && !go1.23)
// +build amd64,go1.17,!go1.23 arm64,go1.20,!go1.23

/*
Expand Down
2 changes: 1 addition & 1 deletion ast/b64_amd64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build amd64,go1.16
// +build amd64,go1.17

/**
* Copyright 2023 ByteDance Inc.
Expand Down
2 changes: 1 addition & 1 deletion ast/b64_compat.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !amd64 !go1.16
// +build !amd64 !go1.17

/*
* Copyright 2022 ByteDance Inc.
Expand Down
2 changes: 1 addition & 1 deletion compat.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !amd64 go1.23 !go1.17
// +build !amd64 !go1.17 go1.23

/*
* Copyright 2021 ByteDance Inc.
Expand Down
2 changes: 1 addition & 1 deletion encoder/encoder_compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

func init() {
println("WARNING:(encoder) sonic only supports Go1.17~1.22 && CPU amd64, but your environment is not suitable")
println("WARNING:(encoder) sonic only supports (Go1.17~1.22 && CPU amd64) or (G01.20~1.22 && CPU arm64) , but your environment is not suitable")
}

// EnableFallback indicates if encoder use fallback
Expand Down
4 changes: 2 additions & 2 deletions internal/decoder/api/decoder_amd64.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build go1.16 && !go1.23
// +build go1.16,!go1.23
//go:build go1.17 && !go1.23
// +build go1.17,!go1.23

/*
* Copyright 2021 ByteDance Inc.
Expand Down
2 changes: 1 addition & 1 deletion internal/decoder/api/decoder_arm64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build go1.16,!go1.23
// +build go1.17,!go1.23

/*
* Copyright 2021 ByteDance Inc.
Expand Down
130 changes: 0 additions & 130 deletions internal/decoder/jitdec/asm_stubs_amd64_go116.go

This file was deleted.

Loading

0 comments on commit 2507bb8

Please sign in to comment.