mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-19 15:57:48 +08:00
Rename argument to a eligible one
This commit is contained in:
parent
351cc7308d
commit
8d60c278e6
@ -14,6 +14,6 @@ func StringToBytes(s string) (b []byte) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// BytesToString converts byte slice to string without a memory allocation.
|
// BytesToString converts byte slice to string without a memory allocation.
|
||||||
func BytesToString(s []byte) string {
|
func BytesToString(b []byte) string {
|
||||||
return *(*string)(unsafe.Pointer(&s))
|
return *(*string)(unsafe.Pointer(&b))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user