maddalax / htmgo

htmgo - build simple and scalable systems with go + htmx
https://htmgo.dev
MIT License
723 stars 19 forks source link

go.work in root #38

Closed gedw99 closed 3 weeks ago

gedw99 commented 3 weeks ago

add a go.work to make vscode / delve happy when working with the sub projects.

gedw99 commented 3 weeks ago

this works for me...

go 1.23.0

toolchain go1.23.2

use ./examples/chat
gedw99 commented 3 weeks ago

the go.sum can still be .gitignored. it currently is.

maddalax commented 3 weeks ago

I think it will break CI if I check it in because one of the workflows runs htmgo template to ensure it still works. I'll paste my go.work file here if you want to use it locally for now:

go 1.23.0

use (
    cli/htmgo
    examples/todo-list
    framework
    framework-ui
    htmgo-site
    templates/starter
    examples/chat
    examples/hackernews
    tools/html-to-htmgo
    examples/simple-auth
)

There also doesn't seem to be consensus on if go.mod should be checked: https://github.com/golang/go/issues/53502

gedw99 commented 3 weeks ago

True there is no consensus .

It’s my bias because I work in mono repos , and so every project I git clone needs a go.work

it’s all fine . I can manage the go.work one level up in my mono repo.