Skip to content

Is it work in alpine ? #25

@ggwhite

Description

@ggwhite

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 # 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions