From ca95d35b452fb00dc4b61d250401cda9e1ddc496 Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Thu, 7 Jul 2022 13:21:26 +0200 Subject: [PATCH] chore: commit save point --- .idea/runConfigurations/document_build.xml | 12 ++ application/source/commands/01_config.go | 15 ++- application/source/commands/01_state.go | 25 +++- application/source/commands/08_document.go | 7 +- .../source/commands/08_document_add.go | 4 +- .../source/commands/08_document_build.go | 80 ++++++++++++ application/source/document/build.go | 62 +++++++++ application/source/document/definition.go | 26 ++++ application/source/document/document.go | 24 ++++ application/source/document/yaml.go | 120 ++++++++++++++++++ application/source/go.mod | 9 +- application/source/go.sum | 57 +++++++++ 12 files changed, 426 insertions(+), 15 deletions(-) create mode 100644 .idea/runConfigurations/document_build.xml create mode 100644 application/source/commands/08_document_build.go create mode 100644 application/source/document/build.go create mode 100644 application/source/document/definition.go create mode 100644 application/source/document/document.go create mode 100644 application/source/document/yaml.go diff --git a/.idea/runConfigurations/document_build.xml b/.idea/runConfigurations/document_build.xml new file mode 100644 index 0000000..362fca5 --- /dev/null +++ b/.idea/runConfigurations/document_build.xml @@ -0,0 +1,12 @@ +<component name="ProjectRunConfigurationManager"> + <configuration default="false" name="document build" type="GoApplicationRunConfiguration" factoryName="Go Application"> + <module name="documentation-manager" /> + <working_directory value="$PROJECT_DIR$/development/examples/example1" /> + <parameters value="document build" /> + <kind value="DIRECTORY" /> + <directory value="$PROJECT_DIR$/application/source" /> + <filePath value="$PROJECT_DIR$" /> + <output_directory value="$PROJECT_DIR$/deployment/build" /> + <method v="2" /> + </configuration> +</component> \ No newline at end of file diff --git a/application/source/commands/01_config.go b/application/source/commands/01_config.go index 42c8c36..8a773e6 100644 --- a/application/source/commands/01_config.go +++ b/application/source/commands/01_config.go @@ -8,13 +8,18 @@ import ( "strings" ) -const configName = "config.yaml" +const configFileName = "config.yaml" type Configuration struct { Document struct { Path string `yaml:"Path" envconfig:"PATH"` - Template string `yaml:"Template" envconfig:"TEMPLATE"` DateFormat string `yaml:"DateFormat" envconfig:"DATE_FORMAT"` + Add struct { + Template string `yaml:"Template" envconfig:"NEW_TEMPLATE"` + } + Build struct { + Path string `yaml:"Path" envconfig:"BUILD_PATH"` + } `yaml:"Build"` } `yaml:"Document"` } @@ -46,12 +51,12 @@ func initConfiguration() { usr, err := user.Current() if err == nil { - userConfig = usr.HomeDir + "/.config/" + state.info.Mnemonic + "/" + configName + userConfig = usr.HomeDir + "/.config/" + state.info.Mnemonic + "/" + configFileName } current, err := os.Getwd() if err == nil { - current = current + "/" + configName + current = current + "/" + configFileName } state.configuration = &Configuration{} @@ -62,7 +67,7 @@ func initConfiguration() { state.definition.ConfigurationPath, current, userConfig, - "/etc/" + state.info.Mnemonic + "/" + configName} { + "/etc/" + state.info.Mnemonic + "/" + configFileName} { if checkAndInitConfiguration(path) { return } diff --git a/application/source/commands/01_state.go b/application/source/commands/01_state.go index a6fa7bc..6ab43e4 100644 --- a/application/source/commands/01_state.go +++ b/application/source/commands/01_state.go @@ -18,6 +18,11 @@ type stateStruct struct { configuration *Configuration } +type StateInterface interface { + GetDocumentPath() string + GetDateFormat() string +} + type InfoStruct struct { Version string Build string @@ -54,7 +59,7 @@ func (e *stateStruct) setCode(code int) *stateStruct { return e } -func (e *stateStruct) getDateFormat() string { +func (e *stateStruct) GetDateFormat() string { if e.definition.Document.DateFormat != "" { return e.definition.Document.DateFormat } @@ -64,10 +69,10 @@ func (e *stateStruct) getDateFormat() string { } return "2006-01-02" - + } -func (e *stateStruct) getDocumentPath() string { +func (e *stateStruct) GetDocumentPath() string { if e.definition.Document.Path != "" { return e.definition.Document.Path } @@ -109,7 +114,7 @@ func (e *stateStruct) getDocumentTemplate() string { return t } - if t := evaluateTemplate(e.configuration.Document.Template); t != "" { + if t := evaluateTemplate(e.configuration.Document.Add.Template); t != "" { return t } @@ -133,3 +138,15 @@ func Exit() { os.Exit(state.exitCode) } + +func (e *stateStruct) getBuildPath() string { + if e.definition.Document.Build.Path != "" { + return e.definition.Document.Build.Path + } + + if e.configuration.Document.Build.Path != "" { + return e.configuration.Document.Build.Path + } + + return "" +} diff --git a/application/source/commands/08_document.go b/application/source/commands/08_document.go index f8c5847..34b6719 100644 --- a/application/source/commands/08_document.go +++ b/application/source/commands/08_document.go @@ -18,9 +18,10 @@ func init() { } type DocumentDefinition struct { - Path string `long:"path" short:"p"` - DateFormat string `long:"date-format" short:"d"` - Add DocumentAddDefinition `command:"add" alias:"a"` + Path string `long:"path" short:"p"` + DateFormat string `long:"date-format" short:"d"` + Add DocumentAddDefinition `command:"add" alias:"a"` + Build DocumentBuildDefinition `command:"build" alias:"b"` } func initDocument(command *flags.Command) { diff --git a/application/source/commands/08_document_add.go b/application/source/commands/08_document_add.go index cda9867..79dda5f 100644 --- a/application/source/commands/08_document_add.go +++ b/application/source/commands/08_document_add.go @@ -78,7 +78,7 @@ func initDocumentAdd(command *flags.Command) { func createNewDocument(name string) { - root := state.getDocumentPath() + root := state.GetDocumentPath() path := path.Join(root, name) fileExtension := filepath.Ext(path) @@ -94,7 +94,7 @@ func createNewDocument(name string) { template = newDocumentTemplate } - date := time.Now().Format(state.getDateFormat()) + date := time.Now().Format(state.GetDateFormat()) template = strings.Replace(template, "%%CREATED%%", date, -1) err := os.WriteFile(path, []byte(template), 0644) diff --git a/application/source/commands/08_document_build.go b/application/source/commands/08_document_build.go new file mode 100644 index 0000000..c305381 --- /dev/null +++ b/application/source/commands/08_document_build.go @@ -0,0 +1,80 @@ +package commands + +import ( + "github.com/jessevdk/go-flags" + "gitlab.schukai.com/oss/utilities/documentation-manager/document" + "gitlab.schukai.com/oss/utilities/documentation-manager/translations" + "os" + "path" + "path/filepath" + "strings" + "time" +) + +const documentBuildSymbol = "document-build" + +func init() { + + h := handler{ + init: initDocumentBuild, + execute: runDocumentBuild, + } + + handlers.executor[documentBuildSymbol] = h + +} + +type DocumentBuildDefinition struct { + Template string `long:"template" short:"t"` + Path string `long:"output" short:"o"` +} + +func initDocumentBuild(command *flags.Command) { + const text = "Builds the documentation" + command.ShortDescription = translations.T.Sprintf(text) + command.LongDescription = translations.T.Sprintf(text) + + for _, opt := range command.Options() { + switch opt.LongName { + case "template": + opt.Description = translations.T.Sprintf("template for the new document") + case "output": + opt.Description = translations.T.Sprintf("directory in which the finished documentation is to be written") + } + } + +} + +func buildDocumentation(name string) { + + root := state.GetDocumentPath() + path := path.Join(root, name) + + fileExtension := filepath.Ext(path) + if fileExtension == "" { + path += ".md" + } else if fileExtension != ".md" { + exitWithError(1, "file extension %s is not supported", fileExtension) + } + + template := state.getDocumentTemplate() + + if template == "" { + template = newDocumentTemplate + } + + date := time.Now().Format(state.GetDateFormat()) + template = strings.Replace(template, "%%CREATED%%", date, -1) + + err := os.WriteFile(path, []byte(template), 0644) + CheckError(err) + +} + +func runDocumentBuild(command *flags.Command) { + + // buildDocumentation(name) + + document.Import(state.GetDocumentPath()) + +} diff --git a/application/source/document/build.go b/application/source/document/build.go new file mode 100644 index 0000000..93ead8d --- /dev/null +++ b/application/source/document/build.go @@ -0,0 +1,62 @@ +package document + +import ( + "fmt" + "gitlab.schukai.com/oss/utilities/documentation-manager/commands" + "io/ioutil" + "os" + "path" + "path/filepath" +) + +func Import(state commands.StateInterface, path string) error { + definitions, err := getFiles(path) + if err != nil { + return err + } + fmt.Println(definitions) + return nil +} + +func getFiles(source string) ([]*Definition, error) { + + def := []*Definition{} + + err := filepath.Walk(source, + func(current string, info os.FileInfo, err error) error { + if err != nil { + return err + } + + if info.IsDir() { + return nil + } + + ext := filepath.Ext(current) + if ext != ".md" { + return nil + } + + cp := path.Clean(current) + + c, err := ioutil.ReadFile(cp) + if err != nil { + return err + } + + err, p := evaluateDocumentContent(c) + + if err != nil { + return err + } + + def = append(def, NewDefinition(current, info, p)) + return nil + }) + if err != nil { + return def, err + } + + return def, err + +} diff --git a/application/source/document/definition.go b/application/source/document/definition.go new file mode 100644 index 0000000..a2cd36b --- /dev/null +++ b/application/source/document/definition.go @@ -0,0 +1,26 @@ +package document + +import "os" + +type Definition struct { + sourcePath string + targetPath string + fileInfo os.FileInfo + textMeta textMetaStruct +} + +func NewDefinition(sourcePath string, info os.FileInfo, textMeta textMetaStruct) *Definition { + return &Definition{ + sourcePath: sourcePath, + fileInfo: info, + textMeta: textMeta, + } +} + +func (d *Definition) GetSourcePath() string { + return d.sourcePath +} + +func (d *Definition) GetTargetPath() string { + return d.targetPath +} diff --git a/application/source/document/document.go b/application/source/document/document.go new file mode 100644 index 0000000..d1d12eb --- /dev/null +++ b/application/source/document/document.go @@ -0,0 +1,24 @@ +package document + +import ( + "gopkg.in/yaml.v3" +) + +type document struct { + Absolute string `yaml:"-"` + File string `yaml:"-"` + + // remember the node structure of yaml + OriginNode *yaml.Node `yaml:"-"` + OriginText string `yaml:"-"` + + Title string `yaml:"Title"` + Abbreviation string `yaml:"Abbreviation"` + References []string `yaml:"References"` + Keywords []string `yaml:"Keywords"` + Authors []string `yaml:"Authors"` + Version string `yaml:"Version"` + Created LocaleTime `yaml:"Created"` + LastUpdate LocaleTime `yaml:"Last Update"` + Language string `yaml:"Language"` +} diff --git a/application/source/document/yaml.go b/application/source/document/yaml.go new file mode 100644 index 0000000..bee5724 --- /dev/null +++ b/application/source/document/yaml.go @@ -0,0 +1,120 @@ +package document + +import ( + "bytes" + "errors" + "gopkg.in/yaml.v3" + "strings" + "text/template" + "time" +) + +type textMetaStruct struct { + text string + meta document +} + +type LocaleTime struct { + time.Time +} + +func (l *LocaleTime) UnmarshalYAML(unmarshal func(interface{}) error) error { + var s string + if err := unmarshal(&s); err != nil { + return err + } + + t, err := time.Parse(, s) + if err != nil { + return err + } + + l.Time = t + + return nil +} + +func evaluateDocumentContent(content []byte) (error, textMetaStruct) { + + origin := string(content) + + meta := "" + text := "" + + before, remaining, found := strings.Cut(origin, "---") + if !found { + + t := strings.TrimSpace(origin) + if len(t) == 0 { + return errors.New("the file is empty"), textMetaStruct{ + text: origin, + meta: document{}, + } + } + + return errors.New("the file does not contain a definition block"), textMetaStruct{ + text: origin, + meta: document{}, + } + } + + text += before + + a, b, found := strings.Cut(remaining, "\n...") + if !found { + a, b, found = strings.Cut(remaining, "\n---") + + if !found { + + a, b, found = strings.Cut(remaining, "...") + + if !found { + + a, b, found = strings.Cut(remaining, "---") + + if !found { + return errors.New("the file does not contain a definition block"), textMetaStruct{} + } + + } + } + + } + + meta = a + text += b + + t, err := template.New("overview").Parse(text) + if err != nil { + return err, textMetaStruct{} + } + + var node yaml.Node + err = yaml.Unmarshal([]byte(meta), &node) + if err != nil { + return err, textMetaStruct{} + } + + data := document{} + err = node.Decode(&data) + if err != nil { + return err, textMetaStruct{} + } + + req := textMetaStruct{} + req.meta = data + + req.meta.OriginNode = &node + req.meta.OriginText = text + + var buffer bytes.Buffer + err = t.Execute(&buffer, data) + if err != nil { + return err, textMetaStruct{} + } + + req.text = buffer.String() + + return nil, req + +} diff --git a/application/source/go.mod b/application/source/go.mod index 37d64ed..7f00a8b 100644 --- a/application/source/go.mod +++ b/application/source/go.mod @@ -5,12 +5,19 @@ go 1.18 require ( github.com/gookit/color v1.5.1 github.com/jessevdk/go-flags v1.5.0 + github.com/kelseyhightower/envconfig v1.4.0 golang.org/x/text v0.3.7 gopkg.in/yaml.v3 v3.0.1 ) require ( - github.com/kelseyhightower/envconfig v1.4.0 // indirect + github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/go-chi/chi/v5 v5.0.7 // indirect + github.com/go-chi/docgen v1.2.0 // indirect + github.com/go-chi/httprate v0.5.3 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect + go.uber.org/atomic v1.9.0 // indirect + go.uber.org/multierr v1.8.0 // indirect + go.uber.org/zap v1.21.0 // indirect golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e // indirect ) diff --git a/application/source/go.sum b/application/source/go.sum index d84b106..aef7b50 100644 --- a/application/source/go.sum +++ b/application/source/go.sum @@ -1,24 +1,81 @@ +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-chi/chi/v5 v5.0.1/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8= +github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/docgen v1.2.0 h1:da0Nq2PKU9W9pSOTUfVrKI1vIgTGpauo9cfh4Iwivek= +github.com/go-chi/docgen v1.2.0/go.mod h1:G9W0G551cs2BFMSn/cnGwX+JBHEloAgo17MBhyrnhPI= +github.com/go-chi/httprate v0.5.3 h1:5HPWb0N6ymIiuotMtCfOGpQKiKeqXVzMexHh1W1yXPc= +github.com/go-chi/httprate v0.5.3/go.mod h1:kYR4lorHX3It9tTh4eTdHhcF2bzrYnCrRNlv5+IBm2M= +github.com/go-chi/render v1.0.1/go.mod h1:pq4Rr7HbnsdaeHagklXub+p6Wd16Af5l9koip1OvJns= github.com/gookit/color v1.5.1 h1:Vjg2VEcdHpwq+oY63s/ksHrgJYCTo0bwWvmmYWdE9fQ= github.com/gookit/color v1.5.1/go.mod h1:wZFzea4X8qN6vHOSP2apMb4/+w/orMznEzYsIHPaqKM= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44 h1:Bli41pIlzTzf3KEY06n+xnzK/BESIg2ze4Pgfh/aI8c= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220702020025-31831981b65f h1:xdsejrW/0Wf2diT5CPp3XmKUNbr7Xvw8kYilQ+6qjRY= golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e h1:CsOuNlbOuf0mzxJIefr6Q4uAUetRUwZE4qt7VfzP+xo= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -- GitLab