github.com/golang/dep@v0.5.4/gps/_testdata/cmd/echosleep/echosleep.go (about)

     1  // Copyright 2017 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package main
     6  
     7  import (
     8  	"flag"
     9  	"fmt"
    10  	"time"
    11  )
    12  
    13  func main() {
    14  	n := flag.Int("n", 1, "number of iterations before stopping")
    15  	flag.Parse()
    16  
    17  	for i := 0; i < *n; i++ {
    18  		fmt.Println("foo")
    19  		time.Sleep(time.Duration(i) * 250 * time.Millisecond)
    20  	}
    21  }