golang花样打印

go func() { for { for _, v := range `-\|/` { time.Sleep(50 * time.Millisecond) fmt.Printf("\r%c", v) } } }() for { time.Sleep(1 * time.Second) fmt.Printf("\r|%s", time.Now().Format("2006-01-02 15:04:05")) }


    推荐阅读