all: Use protobuf to generate config structs (fixes #6734) (#6900)

This commit is contained in:
Audrius Butkevicius
2020-08-25 08:11:14 +02:00
committed by GitHub
parent 5b953033c7
commit d507d932b8
84 changed files with 3807 additions and 542 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ func main() {
myID := protocol.NewDeviceID(cert.Certificate[0])
// Load the config
cfg, err := config.Load(locations.Get(locations.ConfigFile), myID, events.NoopLogger)
cfg, _, err := config.Load(locations.Get(locations.ConfigFile), myID, events.NoopLogger)
if err != nil {
log.Fatalln(errors.Wrap(err, "loading config"))
}
+1 -1
View File
@@ -4,7 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.
//go:generate go run ../../script/protofmt.go database.proto
//go:generate go run ../../proto/scripts/protofmt.go database.proto
//go:generate protoc -I ../../ -I . --gogofast_out=. database.proto
package main
+1 -1
View File
@@ -748,7 +748,7 @@ func setupSignalHandling(app *syncthing.App) {
func loadOrDefaultConfig(myID protocol.DeviceID, evLogger events.Logger) (config.Wrapper, error) {
cfgFile := locations.Get(locations.ConfigFile)
cfg, err := config.Load(cfgFile, myID, evLogger)
cfg, _, err := config.Load(cfgFile, myID, evLogger)
if err != nil {
cfg, err = syncthing.DefaultConfig(cfgFile, myID, evLogger, noDefaultFolder)