プロジェクトの名前を「マイ」に変更します

git-svn-id: file:///srv/svn/repo/mai/trunk@56 e410bdd4-646f-c54f-a7ce-fffcc4f439ae
This commit is contained in:
yakumo.izuru
2024-01-19 15:40:12 +00:00
parent 3e6dea4a1d
commit 236003cc7b
17 changed files with 60 additions and 197 deletions

View File

@@ -7,7 +7,7 @@ import (
"time"
"runtime"
"git.chaotic.ninja/yakumo.izuru/simplytranslate/engines"
"marisa.chaotic.ninja/mai/engines"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/template/html/v2"
)

20
cmd/mai/readconf.go Normal file
View File

@@ -0,0 +1,20 @@
// Read the INI-style configuration file
package main
import (
"gopkg.in/ini.v1"
)
func readConf(file string) error {
cfg, err := ini.Load(file)
if err != nil {
return err
}
conf.listen = cfg.Section("mai").Key("listen").String()
conf.staticpath = cfg.Section("mai").Key("rootdir").String()
conf.tmplpath = cfg.Section("mai").Key("tmplpath").String()
return nil
}

View File

@@ -1,20 +0,0 @@
// Read the INI-style configuration file
package main
import (
"gopkg.in/ini.v1"
)
func readConf(file string) error {
cfg, err := ini.Load(file)
if err != nil {
return err
}
conf.listen = cfg.Section("simplytranslate").Key("listen").String()
conf.staticpath = cfg.Section("simplytranslate").Key("rootdir").String()
conf.tmplpath = cfg.Section("simplytranslate").Key("tmplpath").String()
return nil
}