mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-06 08:16:19 +02:00
17 lines
255 B
Go
17 lines
255 B
Go
package yaml
|
|
|
|
import (
|
|
"gopkg.in/yaml.v2"
|
|
)
|
|
|
|
type Config struct {
|
|
Debug bool `yaml:"debug"`
|
|
Branches []string `yaml:"branches"`
|
|
}
|
|
|
|
func Parse(raw string) (*Config, error) {
|
|
c := &Config{}
|
|
err := yaml.Unmarshal([]byte(raw), c)
|
|
return c, err
|
|
}
|