minor
This commit is contained in:
parent
40db2d84ef
commit
101e9bd0d2
18
config.go
18
config.go
|
@ -4,32 +4,17 @@ package main
|
||||||
// data to and from config files
|
// data to and from config files
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"go.wit.com/lib/config"
|
|
||||||
"go.wit.com/lib/protobuf/forgepb"
|
"go.wit.com/lib/protobuf/forgepb"
|
||||||
"go.wit.com/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func forgeConfigSave() error {
|
func forgeConfigSave() error {
|
||||||
return me.forge.Config.ConfigSave()
|
return me.forge.Config.ConfigSave()
|
||||||
}
|
}
|
||||||
|
|
||||||
func configInit() (*forgepb.ForgeConfigs, error) {
|
|
||||||
/*
|
/*
|
||||||
// the default forged dir is /home/forge
|
func configInit() (*forgepb.ForgeConfigs, error) {
|
||||||
if os.Getenv("FORGE_GOSRC") == "" {
|
|
||||||
os.Setenv("FORGE_GOSRC", "/home/forge")
|
|
||||||
}
|
|
||||||
|
|
||||||
if os.Getenv("FORGE_PATCHDIR") == "" {
|
|
||||||
os.Setenv("FORGE_PATCHDIR", "/var/lib/forged")
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
me.urlbase = argv.URL
|
me.urlbase = argv.URL
|
||||||
if me.urlbase == "" {
|
if me.urlbase == "" {
|
||||||
me.urlbase = "https://go.wit.com/"
|
me.urlbase = "https://go.wit.com/"
|
||||||
|
@ -57,6 +42,7 @@ func configInit() (*forgepb.ForgeConfigs, error) {
|
||||||
}
|
}
|
||||||
return configs, err
|
return configs, err
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
func sampleConfig(all *forgepb.ForgeConfigs) {
|
func sampleConfig(all *forgepb.ForgeConfigs) {
|
||||||
new1 := new(forgepb.ForgeConfig)
|
new1 := new(forgepb.ForgeConfig)
|
||||||
|
|
Loading…
Reference in New Issue