diff --git a/blog/content/slices/prog020.go b/blog/content/slices/prog020.go index 4652722e..472f68af 100644 --- a/blog/content/slices/prog020.go +++ b/blog/content/slices/prog020.go @@ -12,7 +12,8 @@ var buffer [256]byte var slice []byte = buffer[100:150] func SubtractOneFromLength(slice []byte) []byte { - return slice[0 : len(slice)-1] + slice = slice[0 : len(slice)-1] + return slice } func main() {