aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-05-08 19:44:17 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-05-08 19:44:17 +0900
commit7e9f616639c29436ab66cc08c70028beded2877d (patch)
treec5f2f2823336c36e76bc4deb666a33e1f26ce1ea
parentAdd --break-on-error option to lex command (diff)
downloadtre-7e9f616639c29436ab66cc08c70028beded2877d.tar.gz
tre-7e9f616639c29436ab66cc08c70028beded2877d.tar.xz
Change package structure
The executable can be installed using `go install ./cmd/maleeni`.
-rw-r--r--cmd/generator/main.go (renamed from generator/main.go)0
-rw-r--r--cmd/maleeni/compile.go (renamed from cli/cmd/compile.go)2
-rw-r--r--cmd/maleeni/lex.go (renamed from cli/cmd/lex.go)2
-rw-r--r--cmd/maleeni/main.go (renamed from cli/main.go)4
-rw-r--r--cmd/maleeni/root.go (renamed from cli/cmd/root.go)2
-rw-r--r--compiler/ucd.go2
6 files changed, 5 insertions, 7 deletions
diff --git a/generator/main.go b/cmd/generator/main.go
index 3edcef5..3edcef5 100644
--- a/generator/main.go
+++ b/cmd/generator/main.go
diff --git a/cli/cmd/compile.go b/cmd/maleeni/compile.go
index f2d56fa..6a5e303 100644
--- a/cli/cmd/compile.go
+++ b/cmd/maleeni/compile.go
@@ -1,4 +1,4 @@
-package cmd
+package main
import (
"encoding/json"
diff --git a/cli/cmd/lex.go b/cmd/maleeni/lex.go
index 3a9059f..c111370 100644
--- a/cli/cmd/lex.go
+++ b/cmd/maleeni/lex.go
@@ -1,4 +1,4 @@
-package cmd
+package main
import (
"encoding/json"
diff --git a/cli/main.go b/cmd/maleeni/main.go
index 24973e7..701f02f 100644
--- a/cli/main.go
+++ b/cmd/maleeni/main.go
@@ -2,12 +2,10 @@ package main
import (
"os"
-
- "github.com/nihei9/maleeni/cli/cmd"
)
func main() {
- err := cmd.Execute()
+ err := Execute()
if err != nil {
os.Exit(1)
}
diff --git a/cli/cmd/root.go b/cmd/maleeni/root.go
index 3c7109b..41c3081 100644
--- a/cli/cmd/root.go
+++ b/cmd/maleeni/root.go
@@ -1,4 +1,4 @@
-package cmd
+package main
import (
"fmt"
diff --git a/compiler/ucd.go b/compiler/ucd.go
index 7432ba6..8c01595 100644
--- a/compiler/ucd.go
+++ b/compiler/ucd.go
@@ -1,4 +1,4 @@
-//go:generate go run ../generator/main.go
+//go:generate go run ../cmd/generator/main.go
//go:generate gofmt -w ucd_table.go
package compiler