summaryrefslogtreecommitdiff
path: root/config.go
blob: 861efc745ecaf3a914b9bbdca4f0e686acafbd39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package main

// functions to import and export the protobuf
// data to and from config files

import (
	"go.wit.com/lib/config"
	"go.wit.com/lib/protobuf/forgepb"
	"go.wit.com/log"
)

func setForgeMode(fmode forgepb.ForgeMode) {
	if me.forge.Config.Mode == fmode {
		return
	}
	log.Infof("forced save. changed Mode state from %s to %s\n", me.forge.Config.Mode, fmode)
	me.forge.Config.Mode = fmode
	config.SetChanged("forge", true)
	me.forge.Config.ConfigSave()
}