boxesandglue / bagme

boxes and glue made easy - a PDF rendering library for Go using boxes and glue
BSD 3-Clause "New" or "Revised" License
73 stars 2 forks source link

Go 1.18 version support #4

Closed muhmudrik closed 1 year ago

muhmudrik commented 1 year ago

Hi again, When i tried to run your example in for this library on go1.18.10 i got this error

../../../go/pkg/mod/github.com/speedata/baseline-pdf@v0.0.0-20230621085521-8a602a1d42b8/writer.go:60:18: undefined: strings.CutPrefix
note: module requires Go 1.20

is it expected because i use go1.18.10?

pgundlach commented 1 year ago

I will take a look, thank you!

pgundlach commented 1 year ago

I am not sure that we have the same version. I've cloned the library

git clone https://github.com/speedata/bagme-examples.git

and in the directory bagme-examples/basic/simple I run these commands

go version
go version go1.18.10 darwin/arm64

and

go run main.go

which produces the document I'd expect

How do you clone/run this example?

pgundlach commented 1 year ago

BTW: I will update all the bagme stuff in the next few days (I am currently moving the CSS handling to the boxesandglue library).

I will have to switch to go version 1.20 (and later this year to go version 1.21) since I am now using the slog structured logging module which will be part of the 1.21 standard library. In 2024 I will stop using the latest go versions and be a bit more conservative.

muhmudrik commented 1 year ago

I am not sure that we have the same version. I've cloned the library

git clone https://github.com/speedata/bagme-examples.git

and in the directory bagme-examples/basic/simple I run these commands

go version
go version go1.18.10 darwin/arm64

and

go run main.go

which produces the document I'd expect

How do you clone/run this example?

Idk what i did but when i tried the steps you mentioned the issue is missing :"D So i guess the issue resolved itself haha, thanks for helping and answering!

muhmudrik commented 1 year ago

BTW: I will update all the bagme stuff in the next few days (I am currently moving the CSS handling to the boxesandglue library).

I will have to switch to go version 1.20 (and later this year to go version 1.21) since I am now using the slog structured logging module which will be part of the 1.21 standard library. In 2024 I will stop using the latest go versions and be a bit more conservative.

Okai noted, will be watching this repository. Good luck!

muhmudrik commented 1 year ago

:D