add: slice internals last lectures
This commit is contained in:
22
16-slices/11-slice-internals-4-append/1-theory/main.go
Normal file
22
16-slices/11-slice-internals-4-append/1-theory/main.go
Normal file
@ -0,0 +1,22 @@
|
||||
// For more tutorials: https://blog.learngoprogramming.com
|
||||
//
|
||||
// Copyright © 2018 Inanc Gumus
|
||||
// Learn Go Programming Course
|
||||
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
//
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
s "github.com/inancgumus/prettyslice"
|
||||
)
|
||||
|
||||
func main() {
|
||||
s.PrintBacking = true
|
||||
|
||||
ages := []int{35, 15}
|
||||
s.Show("ages", ages)
|
||||
|
||||
ages = append(ages, 5)
|
||||
s.Show("append(ages, 5)", ages)
|
||||
}
|
Reference in New Issue
Block a user