web api secret / go fmt

This commit is contained in:
NatureFreshMilk 2019-01-29 18:00:00 +01:00
parent 4f53a7996e
commit 2ae8559a40
3 changed files with 14 additions and 9 deletions

View File

@ -23,7 +23,11 @@ type Config struct {
}
type WebApiConfig struct {
//mapblock debugging
EnableMapblock bool `json:"enablemapblock"`
//mod http bridge secret
SecretKey string `json:"secretkey"`
}
type RenderStateType struct {
@ -72,6 +76,7 @@ func WriteConfig(filename string, cfg *Config) error {
func ParseConfig(filename string) (*Config, error) {
webapi := WebApiConfig{
EnableMapblock: false,
SecretKey: RandStringRunes(16),
}
rstate := RenderStateType{