File tree Expand file tree Collapse file tree 2 files changed +1
-15
lines changed Expand file tree Collapse file tree 2 files changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,4 @@ require (
14
14
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
15
15
)
16
16
17
- go 1.19
17
+ go 1.20
Original file line number Diff line number Diff line change @@ -2,21 +2,7 @@ package swag
2
2
3
3
import "unsafe"
4
4
5
- type internalString struct {
6
- Data unsafe.Pointer
7
- Len int
8
- }
9
-
10
5
// 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
-
19
6
func hackStringBytes (str string ) []byte {
20
7
return unsafe .Slice (unsafe .StringData (str ), len (str ))
21
8
}
22
- */
You can’t perform that action at this time.
0 commit comments