Created
November 22, 2022 10:49
-
-
Save stokito/1db72d073c4fac78fd2cf280318b017d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func Test_insert_with_override(t *testing.T) { | |
reqBody := []byte(`ABCDEFG`) | |
shifted := reqBody[1:] | |
strconv.AppendInt(shifted[:0], int64(123), 10) | |
assert.Equal(t, `A123EFG`, string(reqBody)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment