Restructure repository

The evaluator is the main part of this, so it doesn’t have to be in a
subdirectory.
This commit is contained in:
Simon Bruder 2021-01-05 12:14:00 +01:00
parent 8e763b1b9e
commit 658690b152
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
5 changed files with 4 additions and 4 deletions

4
.gitignore vendored
View file

@ -1,2 +1,2 @@
/evaluator/vendor/
/evaluator/bangs.go
/vendor/
/bangs.go

View file

@ -10,7 +10,7 @@ import (
)
func loadBangs() (bangs map[string]string) {
data, err := ioutil.ReadFile("../bangs.yml")
data, err := ioutil.ReadFile("bangs.yml")
if err != nil {
panic(fmt.Sprintf("Failed to load bangs.yml: %v", err))
}
@ -40,7 +40,7 @@ func main() {
panic(fmt.Sprintf("Failed to create bangs.go: %v", err))
}
out.Write([]byte("// Code generated from ../../bangs.yml DO NOT EDIT.\n"))
out.Write([]byte("// Code generated from ../bangs.yml DO NOT EDIT.\n"))
out.Write([]byte("package main \n\nfunc getBang(name string) string {\n\tswitch name {\n"))
for _, bangName := range bangNames {