Exercises & activities from the go workshop provided by Packt: https://courses.packtpub.com/courses/go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
308 B

  1. package main
  2. import (
  3. "fmt"
  4. "time"
  5. )
  6. func main() {
  7. var count1 *int
  8. count2 := new(int)
  9. countTemp := 5
  10. count3 := &countTemp
  11. t := &time.Time{}
  12. fmt.Printf("count1: %#v\n", count1)
  13. fmt.Printf("count2: %#v\n", count2)
  14. fmt.Printf("count3: %#v\n", count3)
  15. fmt.Printf("time : %#v\n", t)
  16. }