mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 16:47:28 +01:00
Refactor generate.Main.
This commit is contained in:
1 parent
5d5381ea17
commit
ddba103284
3 files changed
+10
-13
No files matched your search
@@ -26,7 +26,14 @@ type Generator interface {
|
||||
Format(rawSource []byte) ([]byte, error)
|
||||
}
|
||||
|
||||
func Main(g Generator) error {
|
||||
func Main(g Generator) {
|
||||
if err := main1(g); err != nil {
|
||||
os.Stderr.WriteString(err.Error() + "\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func main1(g Generator) error {
|
||||
flag.Parse()
|
||||
idMap := &token.IDMap{}
|
||||
files, err := parseFiles(idMap)
|
||||
|
||||
Reference in new issue
Block a user