Skip to content

Commit

Permalink
add in other places
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero committed Feb 13, 2024
1 parent 503d995 commit 60d9ecf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/config/raw/global_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ type TerraformAdminMode struct {
Repo string `yaml:"repo" json:"repo"`
Root string `yaml:"root" json:"root"`
}

type (t TerraformAdminMode) Validate() error {

Check failure on line 37 in server/config/raw/global_cfg.go

View workflow job for this annotation

GitHub Actions / runner / gotest

syntax error: unexpected Validate after top level declaration

Check failure on line 37 in server/config/raw/global_cfg.go

View workflow job for this annotation

GitHub Actions / runner / golangci-lint

syntax error: unexpected Validate after top level declaration

Check failure on line 37 in server/config/raw/global_cfg.go

View workflow job for this annotation

GitHub Actions / runner / golangci-lint

expected ';', found Validate (typecheck)

Check failure on line 37 in server/config/raw/global_cfg.go

View workflow job for this annotation

GitHub Actions / runner / golangci-lint

syntax error: unexpected Validate after top level declaration

Check failure on line 37 in server/config/raw/global_cfg.go

View workflow job for this annotation

GitHub Actions / runner / golangci-lint

syntax error: unexpected Validate after top level declaration
return validation.ValidateStruct(

Check failure on line 38 in server/config/raw/global_cfg.go

View workflow job for this annotation

GitHub Actions / runner / golangci-lint

expected declaration, found 'return' (typecheck)
&t,


type GithubTeam struct {
Name string `yaml:"name" json:"name"`
Org string `yaml:"org" json:"org"`
Expand Down Expand Up @@ -201,6 +207,7 @@ func (g GlobalCfg) ToValid(defaultCfg valid.GlobalCfg) valid.GlobalCfg {
Github: g.Github.ToValid(),
Admin: g.Admin.ToValid(),
RevisionSetter: g.RevisionSetter.ToValid(),
TerraformAdminMode: g.TerraformAdminMode,
}
}

Expand Down
6 changes: 6 additions & 0 deletions server/config/valid/global_cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ type GlobalCfg struct {
Github Github
RevisionSetter RevisionSetter
Admin Admin
TerraformAdminMode TerraformAdminMode
}

type TerraformAdminMode struct {
Repo string
Root string
}

type GithubTeam struct {
Expand Down

0 comments on commit 60d9ecf

Please sign in to comment.