Skip to content

Instantly share code, notes, and snippets.

@stokito
Created November 22, 2022 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stokito/1db72d073c4fac78fd2cf280318b017d to your computer and use it in GitHub Desktop.
Save stokito/1db72d073c4fac78fd2cf280318b017d to your computer and use it in GitHub Desktop.
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