added more
This commit is contained in:
parent
b5ef7e3300
commit
58792c0c87
@ -14,8 +14,6 @@ jobs:
|
|||||||
# - env GOOS=darwin GOARCH=386 go build -o bin/hello-386-darwin hello.go# 64-bit
|
# - env GOOS=darwin GOARCH=386 go build -o bin/hello-386-darwin hello.go# 64-bit
|
||||||
- env GOOS=linux GOARCH=amd64 go build -o bin/hello-amd64-linux hello.go
|
- env GOOS=linux GOARCH=amd64 go build -o bin/hello-amd64-linux hello.go
|
||||||
- env GOOS=linux GOARCH=386 go build -o bin/hello-386-linux hello.go
|
- env GOOS=linux GOARCH=386 go build -o bin/hello-386-linux hello.go
|
||||||
- ls -l bin/
|
|
||||||
- go run hello.go
|
|
||||||
email-zipper:
|
email-zipper:
|
||||||
image: docker.leffler.media/leffler.media/email-zipper
|
image: docker.leffler.media/leffler.media/email-zipper
|
||||||
env:
|
env:
|
||||||
|
8
hello.go
8
hello.go
@ -3,10 +3,12 @@ package main
|
|||||||
import ( "fmt"
|
import ( "fmt"
|
||||||
"time"
|
"time"
|
||||||
"runtime"
|
"runtime"
|
||||||
|
"bufio"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main(){
|
func main(){
|
||||||
duration := time.Second
|
duration := time.Second
|
||||||
|
durMin := time.Minute
|
||||||
fmt.Println("Hello World! 0")
|
fmt.Println("Hello World! 0")
|
||||||
time.Sleep(duration)
|
time.Sleep(duration)
|
||||||
fmt.Println("Hello World! 1")
|
fmt.Println("Hello World! 1")
|
||||||
@ -14,4 +16,10 @@ func main(){
|
|||||||
fmt.Println("Hello World! 2")
|
fmt.Println("Hello World! 2")
|
||||||
time.Sleep(duration)
|
time.Sleep(duration)
|
||||||
fmt.Printf("Hello from: %s %s\n",runtime.GOOS,runtime.GOARCH)
|
fmt.Printf("Hello from: %s %s\n",runtime.GOOS,runtime.GOARCH)
|
||||||
|
time.Sleep(duration)
|
||||||
|
scanner := bufio.NewScanner(os.Stdin)
|
||||||
|
scanner.Scan() // use `for scanner.Scan()` to keep reading
|
||||||
|
line := scanner.Text()
|
||||||
|
fmt.Println("captured:",line)
|
||||||
|
timeSleep(durMin)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user