Port of glow or similar Markdown reader for console

While searching for a console based markdown reader, I came across glow and tried to compile it under Haiku.

It’s written in Go, which is already ported, but sadly I cannot get glow to compile, anyone had any luck with this or can point me to a solution?

This is the error I get for all dependencies, e.g.:

../github.com/charmbracelet/glow/ui/sort.go:5:2: cannot find package "slices" in any of:
        /packages/golang-1.4.3-7/.self/non-packaged/lib/go/src/slices (from $GOROOT)
        /boot/home/go/src/slices (from $GOPATH)

It seems go does not try to search for packages online.
GOROOT and GOPATH are set correctly from what I see.

The directory layout also follows recommendations in

Lastly, the go mod command mentioned in the Go docs and the SO thread is not available in Haiku:

go mod init
go: unknown subcommand "mod"

The ported go is a very old version of go.

ah dammit, was not sure, but then 1.4 << 1.14. Will try to update the recipe then, thanks @coolcoder613 .

1 Like

You will have to try with Korli and return0e work on updating Go: GitHub - korli/go at golang-1.18-haiku

I’m not sure what state it’s in currently and I think it has to be cross-compiled from Linux?

1 Like

thanks for the pointer! Hmmm seems quite old but still better than the old version in the repo.