Skip to content

Commit 53e32e8

Browse files
committed
chore(go): go-openapi requires go.1.20 across the board
Signed-off-by: Frederic BIDON <[email protected]>
1 parent 5e655d8 commit 53e32e8

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

Diff for: go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ require (
1414
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
1515
)
1616

17-
go 1.19
17+
go 1.20

Diff for: string_bytes.go

-14
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,7 @@ package swag
22

33
import "unsafe"
44

5-
type internalString struct {
6-
Data unsafe.Pointer
7-
Len int
8-
}
9-
105
// hackStringBytes returns the (unsafe) underlying bytes slice of a string.
11-
func hackStringBytes(str string) []byte {
12-
p := (*internalString)(unsafe.Pointer(&str)).Data
13-
return unsafe.Slice((*byte)(p), len(str))
14-
}
15-
16-
/*
17-
* go1.20 version (for when go mod moves to a go1.20 requirement):
18-
196
func hackStringBytes(str string) []byte {
207
return unsafe.Slice(unsafe.StringData(str), len(str))
218
}
22-
*/

0 commit comments

Comments
 (0)