diff options
-rw-r--r-- | content/slices/prog020.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/content/slices/prog020.go b/content/slices/prog020.go index 4652722..472f68a 100644 --- a/content/slices/prog020.go +++ b/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() { |