修理済み
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/yukari/trunk@152 f3bd38d9-da89-464d-a02a-eb04e43141b5
This commit is contained in:
parent
d32086317e
commit
ec7aed8219
@ -1,3 +1,7 @@
|
|||||||
|
# v0.2.5 - 2024.03.24
|
||||||
|
* Rename `config.readConfig` to `config.ReadConfig`
|
||||||
|
* Assume default values if no `yukari.ini(5)` is loaded
|
||||||
|
|
||||||
# v0.2.4 - 2024.03.24
|
# v0.2.4 - 2024.03.24
|
||||||
* Replace invalid favicon with one sourced from [here](https://en.touhouwiki.net/wiki/File:Th123YukariSigil.png), as well as using `//go:embed` for it
|
* Replace invalid favicon with one sourced from [here](https://en.touhouwiki.net/wiki/File:Th123YukariSigil.png), as well as using `//go:embed` for it
|
||||||
* Add rc.d files for FreeBSD and OpenBSD, respectively
|
* Add rc.d files for FreeBSD and OpenBSD, respectively
|
||||||
|
@ -913,16 +913,20 @@ func main() {
|
|||||||
flag.BoolVar(&version, "version", false, "Show version")
|
flag.BoolVar(&version, "version", false, "Show version")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
config.Config.ListenAddress = "127.0.0.1:3000"
|
if configFile != "" {
|
||||||
config.Config.Key = ""
|
config.ReadConfig(configFile)
|
||||||
config.Config.IPV6 = true
|
} else {
|
||||||
config.Config.Debug = false
|
config.Config.ListenAddress = "127.0.0.1:3000"
|
||||||
config.Config.RequestTimeout = 5
|
config.Config.Key = ""
|
||||||
config.Config.FollowRedirect = false
|
config.Config.IPV6 = true
|
||||||
config.Config.UrlParameter = "yukariurl"
|
config.Config.Debug = false
|
||||||
config.Config.HashParameter = "yukarihash"
|
config.Config.RequestTimeout = 5
|
||||||
config.Config.MaxConnsPerHost = 5
|
config.Config.FollowRedirect = false
|
||||||
config.Config.ProxyEnv = false
|
config.Config.UrlParameter = "yukariurl"
|
||||||
|
config.Config.HashParameter = "yukarihash"
|
||||||
|
config.Config.MaxConnsPerHost = 5
|
||||||
|
config.Config.ProxyEnv = false
|
||||||
|
}
|
||||||
|
|
||||||
if version {
|
if version {
|
||||||
yukari.FullVersion()
|
yukari.FullVersion()
|
||||||
|
@ -17,7 +17,7 @@ var Config struct {
|
|||||||
ProxyEnv bool
|
ProxyEnv bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func readConfig(file string) error {
|
func ReadConfig(file string) error {
|
||||||
cfg, err := ini.Load(file)
|
cfg, err := ini.Load(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user