Skip to content

Commit

Permalink
validation: unmarshal standard release into exported struct member
Browse files Browse the repository at this point in the history
and panic if we get an empty string
  • Loading branch information
geoknee committed Nov 15, 2024
1 parent e72c631 commit 0883014
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions validation/standard/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ func init() {
// Get the single standard release Tag (universal across superchain targets)
// and store in the standard.Release
temp := new(struct {
sr Tag `toml:"standard_release,omitempty"`
Sr string `toml:"standard_release"`
})
decodeTOMLFileIntoConfig("standard-releases.toml", temp)
Release = temp.sr
Release = Tag(temp.Sr)
if Release == "" {
panic("empty standard release")
}
}

func decodeTOMLFileIntoConfig[
Expand Down

0 comments on commit 0883014

Please sign in to comment.