fork download
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "os"
  6. )
  7.  
  8. func init() {
  9. fmt.Println("1st")
  10. }
  11.  
  12. func main() {
  13. fmt.Println("no run")
  14. }
  15.  
  16. func init() {
  17. fmt.Println("2nd")
  18. }
  19.  
  20. func init() {
  21. fmt.Println("3rd")
  22. os.Exit(0)
  23. }
Success #stdin #stdout 0s 4232KB
stdin
Standard input is empty
stdout
1st
2nd
3rd