Melkeydev / go-blueprint

Go-blueprint allows users to spin up a quick Go project using a popular framework
https://docs.go-blueprint.dev/
MIT License
5.94k stars 335 forks source link

Have each framework have their own set of templates #102

Closed rustafariandev closed 1 year ago

rustafariandev commented 1 year ago

To make it easier to generate different types of go projects, CLI, HTTP servers, and TCP/UDP servers.

Each framework should have its templates instead of sharing files.

This will increase the duplication of common files like README, .gitignore, and .air.toml. But, it will increase the flexibility of the different types of frameworks that can be supported.

Maybe a structure like this Where each framework exposes its own embed.FS.

The contents of cmd/template/chi/fs.go are the following.

package chi

import "embed"

//go:embed internal cmd all:*.tmpl
var FS embed.FS

I have a concept of this working. Let me know if you are interested.