Initial commit
This commit is contained in:
20
lib/settings/settings.go
Normal file
20
lib/settings/settings.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package settings
|
||||
|
||||
import (
|
||||
"github.com/caarlos0/env/v11"
|
||||
)
|
||||
|
||||
type Settings struct {
|
||||
APIKey string `env:"RELEASER_API_KEY,required"`
|
||||
Owner string `env:"RELEASER_OWNER,required"`
|
||||
Repo string `env:"RELEASER_REPO,required"`
|
||||
Tag string `env:"RELEASER_TAG,required"`
|
||||
Draft bool `env:"RELEASER_DRAFT,required"`
|
||||
Title string `env:"RELEASER_TITLE,required"`
|
||||
Description string `env:"RELEASER_DESCRIPTION,required"`
|
||||
Storage string `env:"RELEASER_STORAGE,required"`
|
||||
}
|
||||
|
||||
func (s *Settings) Populate() error {
|
||||
return env.Parse(s)
|
||||
}
|
||||
Reference in New Issue
Block a user