diff --git a/cli/cli.go b/cli/cli.go new file mode 100644 index 0000000..7a06cc5 --- /dev/null +++ b/cli/cli.go @@ -0,0 +1,57 @@ +// (c) 2022-2023 Jacek Olszak +// This code is licensed under MIT license (see LICENSE for details) + +package main + +import ( + "fmt" + "os" + + "github.com/urfave/cli/v2" + + "github.com/elgopher/pi/cli/internal/convert" +) + +func main() { + app := cli.App{ + Usage: "Pi Command Line Interface", + Commands: []*cli.Command{ + convertCmd(), + }, + } + err := app.Run(os.Args) + if err != nil { + _, _ = os.Stderr.WriteString(err.Error()) + } +} + +func convertCmd() *cli.Command { + return &cli.Command{ + Name: "convert", + Usage: "Converts one file format into another one", + Description: "Format of input and output file is deducted based on files extension.", + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "format", + Aliases: []string{"f"}, + Usage: "Format of input file. Overrides what CLI deducted based on input file extension. For now, the only supported input format is p8.", + }, + }, + ArgsUsage: "input.file output.file", + Action: func(context *cli.Context) error { + inputFile := context.Args().Get(0) + outputFile := context.Args().Get(1) + + if context.Args().Len() > 2 { + return fmt.Errorf("too many arguments") + } + + command := convert.Command{ + InputFormat: convert.InputFormat(context.String("format")), + InputFile: inputFile, + OutputFile: outputFile, + } + return command.Run() + }, + } +} diff --git a/cli/go.mod b/cli/go.mod new file mode 100644 index 0000000..a743bca --- /dev/null +++ b/cli/go.mod @@ -0,0 +1,11 @@ +module github.com/elgopher/pi/cli + +go 1.20 + +require github.com/urfave/cli/v2 v2.25.7 + +require ( + github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect +) diff --git a/cli/go.sum b/cli/go.sum new file mode 100644 index 0000000..54cdbc1 --- /dev/null +++ b/cli/go.sum @@ -0,0 +1,8 @@ +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= +github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= diff --git a/cli/internal/convert/convert.go b/cli/internal/convert/convert.go new file mode 100644 index 0000000..7c5dbfe --- /dev/null +++ b/cli/internal/convert/convert.go @@ -0,0 +1,63 @@ +// (c) 2022-2023 Jacek Olszak +// This code is licensed under MIT license (see LICENSE for details) + +package convert + +import ( + "fmt" + "strings" + + "github.com/elgopher/pi/cli/internal/convert/internal/p8" +) + +type InputFormat string + +const ( + InputFormatP8 = "p8" +) + +type Command struct { + InputFormat + InputFile string + OutputFile string +} + +func (o Command) Run() error { + if o.InputFormat != "" && o.InputFormat != InputFormatP8 { + return fmt.Errorf("input format %s not supported", o.InputFormat) + } + + if o.InputFormat == "" { + if strings.HasSuffix(o.InputFile, ".p8") { + o.InputFormat = InputFormatP8 + } else { + return fmt.Errorf("cannot deduct the format of %s input file", o.InputFile) + } + } + + if o.InputFile == "" { + return fmt.Errorf("input file not provided") + } + + if o.OutputFile == "" { + return fmt.Errorf("output file not provided") + } + + fmt.Printf("Converting %s to %s... ", o.InputFile, o.OutputFile) + fmt.Printf("Using %s input format... ", o.InputFormat) + if err := o.convert(); err != nil { + return err + } + fmt.Println("Done") + return nil +} + +func (o Command) convert() error { + if o.InputFormat == InputFormatP8 { + if err := p8.ConvertToAudioSfx(o.InputFile, o.OutputFile); err != nil { + return err + } + } + + return nil +} diff --git a/cli/internal/convert/internal/p8/p8.go b/cli/internal/convert/internal/p8/p8.go new file mode 100644 index 0000000..68bda5d --- /dev/null +++ b/cli/internal/convert/internal/p8/p8.go @@ -0,0 +1,112 @@ +package p8 + +import ( + "bufio" + "fmt" + "io" + "os" + "strconv" + "strings" + + "github.com/elgopher/pi/audio" +) + +func ConvertToAudioSfx(inputFile, outputFile string) error { + p8file, err := Load(inputFile) + if err != nil { + return fmt.Errorf("loading p8 file failed: %w", err) + } + + effects, err := p8file.SoundEffects() + if err != nil { + return fmt.Errorf("loading sound effects failed: %w", err) + } + audio.Sfx = effects + + patterns, err := p8file.MusicPatterns() + if err != nil { + return fmt.Errorf("loading music patterns failed: %w", err) + } + audio.Pat = patterns + + bytes, err := audio.Save() + if err != nil { + return fmt.Errorf("saving audio failed: %w", err) + } + + err = os.WriteFile(outputFile, bytes, 0644) + if err != nil { + return fmt.Errorf("writing %s failed: %w", outputFile, err) + } + + return nil +} + +func Load(filename string) (*File, error) { + file := &File{} + + f, err := os.Open(filename) + if err != nil { + return nil, fmt.Errorf("opening %s file failed: %w", filename, err) + } + + reader := bufio.NewReader(f) + _, err = readHeader(reader) + if err != nil { + return nil, err + } + + for { + err = file.readSection(reader) + if err == io.EOF { + return file, nil + } + } +} + +func readHeader(r *bufio.Reader) (version int, err error) { + firstLine, err := r.ReadString('\n') + if err != nil { + return 0, fmt.Errorf("error reading first line from p8 file header: %w", err) + } + + if firstLine != "pico-8 cartridge // http://www.pico-8.com" { + return 0, fmt.Errorf("input file is not p8 cartridge file. Header expected") + } + + versionLine, err := r.ReadString('\n') + if !strings.HasPrefix(versionLine, "version ") { + return 0, fmt.Errorf("input file is not p8 cartridge file. Version in header expected, but not found") + } + + versionString := strings.SplitN(versionLine, " ", 2)[1] + + version, err = strconv.Atoi(versionString) + if err != nil { + return 0, fmt.Errorf("input file is not p8 cartridge file. Version number in header expected, but found %s", versionString) + } + + return version, nil +} + +type File struct { +} + +func (p *File) readSection(reader *bufio.Reader) error { + sectionName, err := reader.ReadString('\n') + if err != nil { + return err + } + + fmt.Println(sectionName) + + return nil +} + +func (p *File) SoundEffects() ([64]audio.SoundEffect, error) { + return [64]audio.SoundEffect{}, nil +} + +func (p *File) MusicPatterns() ([64]audio.Pattern, error) { + return [64]audio.Pattern{}, nil +} diff --git a/cli/internal/convert/internal/test/code.p8 b/cli/internal/convert/internal/test/code.p8 new file mode 100644 index 0000000..b58552a --- /dev/null +++ b/cli/internal/convert/internal/test/code.p8 @@ -0,0 +1,13 @@ +pico-8 cartridge // http://www.pico-8.com +version 41 +__lua__ +function _draw() +end +function _lua +__gfx__ +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 diff --git a/cli/internal/convert/internal/test/minimal.p8 b/cli/internal/convert/internal/test/minimal.p8 new file mode 100644 index 0000000..2c2226c --- /dev/null +++ b/cli/internal/convert/internal/test/minimal.p8 @@ -0,0 +1,9 @@ +pico-8 cartridge // http://www.pico-8.com +version 41 +__gfx__ +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 diff --git a/cli/internal/convert/internal/test/music.p8 b/cli/internal/convert/internal/test/music.p8 new file mode 100644 index 0000000..a7cb36c --- /dev/null +++ b/cli/internal/convert/internal/test/music.p8 @@ -0,0 +1,15 @@ +pico-8 cartridge // http://www.pico-8.com +version 41 +__gfx__ +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +__sfx__ +000100000000027050270502705027050260502605026050260502605026050260502605026050260502605026050260502605027050270502705027050280500000000000000000000000000000000000000000 +00100000000000000000000000003505032050310502e0502d0502b0502a050290502805027050260502505024050240502305000000000000000000000000000000000000000000000000000000000000000000 +__music__ +00 01424344 + diff --git a/cli/internal/convert/internal/test/sfx.p8 b/cli/internal/convert/internal/test/sfx.p8 new file mode 100644 index 0000000..d395542 --- /dev/null +++ b/cli/internal/convert/internal/test/sfx.p8 @@ -0,0 +1,74 @@ +pico-8 cartridge // http://www.pico-8.com +version 41 +__gfx__ +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +__sfx__ +000100003075000000000002805000000000000000000000000000000000000000002b05000000000000000000000000000000000000310500000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +000700000000000000157501575017750187501b7501f750257502d750317502c75026750217501e7501b750167501475013750157501a7501e7502275025750227501d75019750187503475000000000001b750 diff --git a/go.work b/go.work new file mode 100644 index 0000000..96a3412 --- /dev/null +++ b/go.work @@ -0,0 +1,6 @@ +go 1.20 + +use ( + . + ./cli +) diff --git a/go.work.sum b/go.work.sum new file mode 100644 index 0000000..b5c16eb --- /dev/null +++ b/go.work.sum @@ -0,0 +1,27 @@ +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= +github.com/hajimehoshi/bitmapfont/v2 v2.2.3 h1:jmq/TMNj352V062Tr5e3hAoipkoxCbY1JWTzor0zNps= +github.com/hajimehoshi/bitmapfont/v2 v2.2.3/go.mod h1:sWM8ejdkGSXaQGlZcegMRx4DyEPOWYyXqsBKIs+Yhzk= +github.com/hajimehoshi/go-mp3 v0.3.4 h1:NUP7pBYH8OguP4diaTZ9wJbUbk3tC0KlfzsEpWmYj68= +github.com/hajimehoshi/go-mp3 v0.3.4/go.mod h1:fRtZraRFcWb0pu7ok0LqyFhCUrPeMsGRSVop0eemFmo= +github.com/jakecoffman/cp v1.2.1 h1:zkhc2Gpo9l4NLUZfeG3j33+3bQD7MkqPa+n5PdX+5mI= +github.com/jakecoffman/cp v1.2.1/go.mod h1:JjY/Fp6d8E1CHnu74gWNnU0+b9VzEdUVPoJxg2PsTQg= +github.com/jfreymuth/oggvorbis v1.0.5 h1:u+Ck+R0eLSRhgq8WTmffYnrVtSztJcYrl588DM4e3kQ= +github.com/jfreymuth/oggvorbis v1.0.5/go.mod h1:1U4pqWmghcoVsCJJ4fRBKv9peUJMBHixthRlBeD6uII= +github.com/jfreymuth/vorbis v1.0.2 h1:m1xH6+ZI4thH927pgKD8JOH4eaGRm18rEE9/0WKjvNE= +github.com/jfreymuth/vorbis v1.0.2/go.mod h1:DoftRo4AznKnShRl1GxiTFCseHr4zR9BN3TWXyuzrqQ= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60 h1:o4bs4seAAlSiZQAZbO6/RP5XBCZCooQS3Pgc0AUjWts= +golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=