Skip to content

Commit

Permalink
move go generate to cmd/generate-readme
Browse files Browse the repository at this point in the history
  • Loading branch information
crhntr committed Jan 29, 2025
1 parent cf05e06 commit 4566d0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion cmd/generate-readme/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ import (
_ "embed"
"log"
"os"
"path/filepath"
"text/template"

"github.com/crhntr/muxt/internal/configuration"
"github.com/crhntr/muxt/internal/muxt"
)

//go:generate go run .

var (
//go:embed README.md.template
templateSource string
Expand All @@ -33,7 +36,7 @@ func main() {
if err != nil {
log.Fatal(err)
}
if err := os.WriteFile("README.md", out.Bytes(), 0o644); err != nil {
if err := os.WriteFile(filepath.FromSlash("../../README.md"), out.Bytes(), 0o644); err != nil {
log.Fatal(err)
}
}
3 changes: 0 additions & 3 deletions readme.md.go

This file was deleted.

0 comments on commit 4566d0b

Please sign in to comment.