🚧 WalkFiles
This commit is contained in:
parent
c711ed6567
commit
19206a9bf5
6 changed files with 157 additions and 16 deletions
|
|
@ -7,7 +7,6 @@ import (
|
|||
"codeberg.org/danjones000/utils/convids"
|
||||
"codeberg.org/danjones000/utils/internal/cli"
|
||||
"github.com/spf13/pflag"
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
const dataPath = "shows.yml"
|
||||
|
|
@ -26,12 +25,7 @@ func main() {
|
|||
fmt.Println("looping")
|
||||
}
|
||||
|
||||
f, err := os.Open(dataPath)
|
||||
cli.HandleErr(err)
|
||||
|
||||
ydec := yaml.NewDecoder(f)
|
||||
var data convids.Data
|
||||
err = ydec.Decode(&data)
|
||||
data, err := convids.NewData(dataPath)
|
||||
cli.HandleErr(err)
|
||||
|
||||
fmt.Printf("Data: %+v\n", data)
|
||||
|
|
@ -39,4 +33,5 @@ func main() {
|
|||
for s := range data.AllShows(false) {
|
||||
fmt.Printf("Show: %+v\n", s)
|
||||
}
|
||||
fmt.Println("\nDone!")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue