Skip to content

Commit

Permalink
Add endpoint config to ui
Browse files Browse the repository at this point in the history
  • Loading branch information
pipe01 committed Dec 27, 2020
1 parent c352164 commit b649850
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/ui/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
)

type Config struct {
Endpoint string `yaml:"endpoint"`
WidgetRows []map[string]*widget.Widget `yaml:"widgets"`
}

Expand All @@ -23,7 +24,9 @@ func Load(path string) (*Config, error) {
return nil, fmt.Errorf("read file: %w", err)
}

var cfg Config
cfg := Config{
Endpoint: "127.0.0.1:4659",
}

if err := yaml.Unmarshal(f, &cfg); err != nil {
return nil, fmt.Errorf("parse yaml: %w", err)
Expand Down

0 comments on commit b649850

Please sign in to comment.