Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it work in alpine ? #25

Open
ggwhite opened this issue Jun 27, 2018 · 0 comments
Open

Is it work in alpine ? #25

ggwhite opened this issue Jun 27, 2018 · 0 comments

Comments

@ggwhite
Copy link

ggwhite commented Jun 27, 2018

I use docker container run golang.

docker pull golang:1.9-alpine3.7
docker run --name golang -d golang:1.9-alpine3.7
docker exec -ti golang sh

in container:

/go # akp add --no-cache git
/go # go get github.com/buger/goterm
/go # mkdir -p /go/src/github.com/test
/go # cd /go/src/github.com/test
/go/src/github.com/test # vi main.go

main.go

package main

import (
    tm "github.com/buger/goterm"
    "time"
)

func main() {
    tm.Clear() // Clear current screen

    for {
        // By moving cursor to top-left position we ensure that console output
        // will be overwritten each time, instead of adding new.
        tm.MoveCursor(1,1)

        tm.Println("Current Time:", time.Now().Format(time.RFC1123))

        tm.Flush() // Call it every time at the end of rendering

        time.Sleep(time.Second)
    }
}

then run it

/go/src/github.com/test # go run main.go

but it not work

like this

/go/src/github.com/test # go run main.go 


asdoifjaof


weirjqoweirjoq


^Csignal: interrupt
/go/src/github.com/test # 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant