Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "log"
- )
- func main() {
- slice := []int{1, 2, 3, 4, 5}
- if !(len(slice) == 5) {
- log.Fatal("Wrong length")
- }
- slice = append(slice, 6, 7, 8)
- if !(len(slice) == 8) {
- log.Fatal("Wrong length")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement