Skip to content

Commit

Permalink
start working on the repository code generator so i dont need to writ…
Browse files Browse the repository at this point in the history
…e the hole thing by hand
  • Loading branch information
Kruemelmann committed Oct 3, 2022
1 parent 4fc883d commit 0e4d5a7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Empty file added src/data/gen/README.md
Empty file.
16 changes: 16 additions & 0 deletions src/data/gen/repogen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package main

import (
"flag"
"fmt"
)

func main() {
str := flag.String("entry", "", "name of the entry to generate the repo for")

//end of all flags
flag.Parse()

//TODO interpretate flags and generate corresponding code
fmt.Printf("hello %v\n", *str)
}
2 changes: 2 additions & 0 deletions src/data/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
_ "github.com/lib/pq"
)

//go:generate go run ./gen/repogen.go -entry role

func main() {
log.Println("Starting walnut-data service")

Expand Down

0 comments on commit 0e4d5a7

Please sign in to comment.