-
Notifications
You must be signed in to change notification settings - Fork 0
/
underground.go
40 lines (34 loc) · 993 Bytes
/
underground.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package main
import (
"embed"
"underground/feature/goservice"
"underground/feature/makefile"
"underground/feature/sqitch"
"underground/feature/sqlc"
"underground/flags"
"underground/os"
)
var (
//go:embed feature/goservice/makefile feature/goservice/*
contentGoService embed.FS
//go:embed feature/makefile/.makefile/* feature/makefile/docsify/* feature/makefile/makefile feature/makefile/README.md
contentMakefile embed.FS
//go:embed feature/sqitch/.makefile feature/sqitch/makefile feature/sqitch/env.sqitch feature/sqitch/README.md
contentSqitch embed.FS
//go:embed feature/sqlc/makefile feature/sqlc/sqlc.yaml feature/sqlc/README.md
contentSqlc embed.FS
)
func main() {
flags.Parse()
if flags.Project != "" {
os.Mkdir(flags.Project)
// create makefile
makefile.Install(contentMakefile)
// add golang service files
goservice.Install(contentGoService)
// add sqitch files
sqitch.Install(contentSqitch)
// add sqlc files
sqlc.Install(contentSqlc)
}
}