From 4ffe3d36c6f0cb411a532e9e965dc945c06201b7 Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Wed, 6 Jul 2022 13:12:21 +0200 Subject: [PATCH] chore: commit save point --- .idea/modules.xml | 2 - .idea/runConfigurations/changelog_print.xml | 12 - .idea/runConfigurations/documents_add.xml | 12 - .../{version.xml => help.xml} | 4 +- .idea/runConfigurations/tasks_print.xml | 12 - README.md | 30 +- application/source/commandlineoptions.go | 31 - application/source/commands/01_state.go | 66 +++ application/source/commands/02_command.go | 31 + application/source/commands/02_handler.go | 37 ++ application/source/commands/03_errors.go | 88 +++ application/source/commands/03_messages.go | 42 ++ application/source/commands/03_terminal.go | 10 + application/source/commands/06_definitions.go | 6 + application/source/commands/07_execute.go | 61 ++ application/source/commands/08_document.go | 35 ++ .../source/commands/08_document_add.go | 106 ++++ application/source/commands/08_version.go | 33 ++ application/source/defaults.go | 233 -------- application/source/documents.go | 142 ----- application/source/go.mod | 47 +- application/source/go.sum | 533 +----------------- application/source/main.go | 51 +- application/source/overview.go | 284 ---------- application/source/translations/catalog.go | 113 ++++ .../locales/de/messages.gotext.json | 34 ++ .../translations/locales/de/out.gotext.json | 198 +++++++ .../translations/locales/en/out.gotext.json | 260 +++++++++ .../source/translations/translations.go | 59 ++ development/examples/example1/doc.pdf | Bin 0 -> 15229 bytes development/examples/example1/feature-1.md | 62 +- development/examples/example1/feature-2.md | 64 +++ .../source => development/temp}/changelog.go | 7 +- .../temp}/commandline.go | 56 +- development/temp/commandlineoptions.go | 31 + .../source => development/temp}/config.go | 30 +- development/temp/dataset.go | 80 +++ development/temp/defaults.go | 69 +++ development/temp/documents.go | 54 ++ .../source => development/temp}/errors.go | 0 .../source => development/temp}/files.go | 12 +- development/temp/html.go | 149 +++++ .../source => development/temp}/l10n.go | 19 +- development/temp/main.go | 50 ++ .../source => development/temp}/message.go | 0 .../source => development/temp}/pandoc.go | 6 +- development/temp/pdf.go | 190 +++++++ .../source => development/temp}/run.go | 0 .../source => development/temp}/tasks.go | 7 +- .../source => development/temp}/util.go | 40 +- 50 files changed, 2082 insertions(+), 1416 deletions(-) delete mode 100644 .idea/runConfigurations/changelog_print.xml delete mode 100644 .idea/runConfigurations/documents_add.xml rename .idea/runConfigurations/{version.xml => help.xml} (72%) delete mode 100644 .idea/runConfigurations/tasks_print.xml delete mode 100644 application/source/commandlineoptions.go create mode 100644 application/source/commands/01_state.go create mode 100644 application/source/commands/02_command.go create mode 100644 application/source/commands/02_handler.go create mode 100644 application/source/commands/03_errors.go create mode 100644 application/source/commands/03_messages.go create mode 100644 application/source/commands/03_terminal.go create mode 100644 application/source/commands/06_definitions.go create mode 100644 application/source/commands/07_execute.go create mode 100644 application/source/commands/08_document.go create mode 100644 application/source/commands/08_document_add.go create mode 100644 application/source/commands/08_version.go delete mode 100644 application/source/defaults.go delete mode 100644 application/source/documents.go delete mode 100644 application/source/overview.go create mode 100644 application/source/translations/catalog.go create mode 100644 application/source/translations/locales/de/messages.gotext.json create mode 100644 application/source/translations/locales/de/out.gotext.json create mode 100644 application/source/translations/locales/en/out.gotext.json create mode 100644 application/source/translations/translations.go create mode 100644 development/examples/example1/doc.pdf create mode 100644 development/examples/example1/feature-2.md rename {application/source => development/temp}/changelog.go (88%) rename {application/source => development/temp}/commandline.go (58%) create mode 100644 development/temp/commandlineoptions.go rename {application/source => development/temp}/config.go (82%) create mode 100644 development/temp/dataset.go create mode 100644 development/temp/defaults.go create mode 100644 development/temp/documents.go rename {application/source => development/temp}/errors.go (100%) rename {application/source => development/temp}/files.go (89%) create mode 100644 development/temp/html.go rename {application/source => development/temp}/l10n.go (94%) create mode 100644 development/temp/main.go rename {application/source => development/temp}/message.go (100%) rename {application/source => development/temp}/pandoc.go (83%) create mode 100644 development/temp/pdf.go rename {application/source => development/temp}/run.go (100%) rename {application/source => development/temp}/tasks.go (93%) rename {application/source => development/temp}/util.go (77%) diff --git a/.idea/modules.xml b/.idea/modules.xml index 3cb0cef..82e2a99 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -3,8 +3,6 @@ <component name="ProjectModuleManager"> <modules> <module fileurl="file://$PROJECT_DIR$/.idea/documentation-manager.iml" filepath="$PROJECT_DIR$/.idea/documentation-manager.iml" /> - <module fileurl="file://$PROJECT_DIR$/../../../schukai/utilities/makefile/makefile.iml" filepath="$PROJECT_DIR$/../../../schukai/utilities/makefile/makefile.iml" /> - <module fileurl="file://$PROJECT_DIR$/../requirements-manager/requirements-manager.iml" filepath="$PROJECT_DIR$/../requirements-manager/requirements-manager.iml" /> </modules> </component> </project> \ No newline at end of file diff --git a/.idea/runConfigurations/changelog_print.xml b/.idea/runConfigurations/changelog_print.xml deleted file mode 100644 index 29352a7..0000000 --- a/.idea/runConfigurations/changelog_print.xml +++ /dev/null @@ -1,12 +0,0 @@ -<component name="ProjectRunConfigurationManager"> - <configuration default="false" name="changelog print" type="GoApplicationRunConfiguration" factoryName="Go Application"> - <module name="documentation-manager" /> - <working_directory value="$PROJECT_DIR$/development/examples/example1" /> - <parameters value="changelog print " /> - <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/.idea/runConfigurations/documents_add.xml b/.idea/runConfigurations/documents_add.xml deleted file mode 100644 index 6da5594..0000000 --- a/.idea/runConfigurations/documents_add.xml +++ /dev/null @@ -1,12 +0,0 @@ -<component name="ProjectRunConfigurationManager"> - <configuration default="false" name="documents add" type="GoApplicationRunConfiguration" factoryName="Go Application"> - <module name="documentation-manager" /> - <working_directory value="$PROJECT_DIR$/development/examples/example1" /> - <parameters value="documents add" /> - <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/.idea/runConfigurations/version.xml b/.idea/runConfigurations/help.xml similarity index 72% rename from .idea/runConfigurations/version.xml rename to .idea/runConfigurations/help.xml index f99562c..c4551a4 100644 --- a/.idea/runConfigurations/version.xml +++ b/.idea/runConfigurations/help.xml @@ -1,8 +1,8 @@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="version" type="GoApplicationRunConfiguration" factoryName="Go Application"> + <configuration default="false" name="help" type="GoApplicationRunConfiguration" factoryName="Go Application"> <module name="documentation-manager" /> <working_directory value="$PROJECT_DIR$" /> - <parameters value="version" /> + <parameters value="--help" /> <kind value="DIRECTORY" /> <directory value="$PROJECT_DIR$/application/source" /> <filePath value="$PROJECT_DIR$" /> diff --git a/.idea/runConfigurations/tasks_print.xml b/.idea/runConfigurations/tasks_print.xml deleted file mode 100644 index a56a726..0000000 --- a/.idea/runConfigurations/tasks_print.xml +++ /dev/null @@ -1,12 +0,0 @@ -<component name="ProjectRunConfigurationManager"> - <configuration default="false" name="tasks print" type="GoApplicationRunConfiguration" factoryName="Go Application"> - <module name="documentation-manager" /> - <working_directory value="$PROJECT_DIR$/development/examples/example1" /> - <parameters value="tasks print" /> - <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/README.md b/README.md index 7195863..db25e20 100644 --- a/README.md +++ b/README.md @@ -13,15 +13,43 @@ For Linux, the execution bit must still be set. chmod u+x docman ``` + + + +## Developments + +To search the source code for new texts, you have to go to the source directory and +call + +```bash +go generate translations/translations.go +``` + + + + + + + + +---- + + + ## Commands ### General Parameters The date format for the output can be specified with the parameter `--date-format`. -All configuration values can also be specified in a configuration file. +All confirguration values can also be specified in a configuration file. The configuration file can be specified with the `--config` parameter. +If no path is specified, the configuration file `config.yaml` is first searched for in the working directory. +If this is not found, the file is searched for in the home directory `~/.config/documentations-manager/config.yaml`. + +Finally, we look for the configuration in the `/etc/documentations-manager/config.yaml` directory. + The parameter `path` specifies the path. ### Help diff --git a/application/source/commandlineoptions.go b/application/source/commandlineoptions.go deleted file mode 100644 index db71689..0000000 --- a/application/source/commandlineoptions.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -type commandLineOptions struct { - Config string `short:"c" long:"config" description:"file with configuration values"` - Path string `short:"p" long:"path" description:"define the path where the specifications are located" default:"."` - DateFormat string `long:"date-format" description:"date format" default:"2006-01-02"` - Documents struct { - Add struct { - Name string `short:"n" long:"name" description:"name of the document"` - } `command:"add"` - } `command:"documents"` - Tasks struct { - Print struct { - } `command:"print"` - } `command:"tasks"` - Changelog struct { - Print struct { - } `command:"print"` - } `command:"changelog"` - Build struct { - Print struct { - Columns []string `short:"c" long:"column" description:"defines the columns used"` - TemplatePath string `short:"t" long:"template" description:"file name of the template of the overview page"` - Output string `short:"o" long:"output" description:"redirect output to a file"` - Format string `short:"f" long:"format" description:"the desired output format" choice:"pdf" choice:"md"` - LatexTemplatePath string `short:"l" long:"latex-template-path" description:"latex template"` - } `command:"print"` - } `command:"build"` - Version struct { - } `command:"version"` -} diff --git a/application/source/commands/01_state.go b/application/source/commands/01_state.go new file mode 100644 index 0000000..a6a78df --- /dev/null +++ b/application/source/commands/01_state.go @@ -0,0 +1,66 @@ +package commands + +import ( + "gitlab.schukai.com/oss/utilities/documentation-manager/translations" + "os" +) + +type stateStruct struct { + info Info + exitCode int + warnings []string + errors []string + messages []string +} + +type Info struct { + Version string + Build string +} + +var state *stateStruct + +func init() { + state = &stateStruct{} +} + +func ExitWithError(code int, message string, a ...interface{}) { + state.SetCode(code).AddError(translations.T.Sprintf(message, a)).Exit() +} + +func (e *stateStruct) AddWarning(warning string) *stateStruct { + e.warnings = append(e.warnings, warning) + return e +} + +func (e *stateStruct) AddError(error string) *stateStruct { + e.errors = append(e.errors, error) + return e +} + +func (e *stateStruct) AddMessage(message string) *stateStruct { + e.messages = append(e.messages, message) + return e +} + +func (e *stateStruct) SetCode(code int) *stateStruct { + e.exitCode = code + return e +} + +const ExitWithCodeSymbol = "exit with code" + +func (e *stateStruct) Exit() { + PrintMessages() + panic(ExitWithCodeSymbol) +} + +func Exit() { + + for _, fkt := range handlers.shutdown { + f := *fkt + f() + } + + os.Exit(state.exitCode) +} diff --git a/application/source/commands/02_command.go b/application/source/commands/02_command.go new file mode 100644 index 0000000..2378b92 --- /dev/null +++ b/application/source/commands/02_command.go @@ -0,0 +1,31 @@ +package commands + +import ( + "github.com/jessevdk/go-flags" + "strings" +) + +func initCommands() { + + for n, h := range handlers.executor { + x := strings.Split(n, "-") + + var c *flags.Command + + for i, y := range x { + + if i == 0 { + c = terminalState.parser.Find(y) + } else { + c = c.Find(y) + } + + } + + if c != nil { + h.init(c) + } + + } + +} diff --git a/application/source/commands/02_handler.go b/application/source/commands/02_handler.go new file mode 100644 index 0000000..da3c67b --- /dev/null +++ b/application/source/commands/02_handler.go @@ -0,0 +1,37 @@ +package commands + +import "github.com/jessevdk/go-flags" + +type handlerStruct struct { + shutdown []*hook + executor map[string]handler +} + +type hook func() + +type handler struct { + init func(*flags.Command) + execute func(*flags.Command) +} + +var handlers handlerStruct + +func init() { + handlers.executor = make(map[string]handler) + handlers.shutdown = make([]*hook, 0) +} + +func (e *handlerStruct) removeShutdownHook(h *hook) *handlerStruct { + for i, f := range e.shutdown { + if f == h { + e.shutdown = append(e.shutdown[:i], e.shutdown[i+1:]...) + return e + } + } + return e +} + +func (e *handlerStruct) addShutdownHook(h *hook) *handlerStruct { + e.shutdown = append(e.shutdown, h) + return e +} diff --git a/application/source/commands/03_errors.go b/application/source/commands/03_errors.go new file mode 100644 index 0000000..e411002 --- /dev/null +++ b/application/source/commands/03_errors.go @@ -0,0 +1,88 @@ +package commands + +import ( + "errors" + "github.com/jessevdk/go-flags" + "gitlab.schukai.com/oss/utilities/documentation-manager/translations" +) + +const ( + // Generic codes. + CodeOK = 0 // success + CodeErr = 1 // generic error + CodeHelpErr = 2 // command is invoked with -help or -h flag but no such flag is defined + + // Codes as defined in /usr/include/sysexits.h on *nix systems. + CodeUsage = 64 // command line usage error + CodeDataErr = 65 // data format error + CodeNoInput = 66 // cannot open input + CodeNoUser = 67 // addressee unknown + CodeNoHost = 68 // host name unknown + CodeUnavailable = 69 // service unavailable + CodeSoftware = 70 // internal software error + CodeOSErr = 71 // system error (e.g., can't fork) + CodeOSFile = 72 // critical OS file missing + CodeCantCreat = 73 // can't create (user) output file + CodeIOErr = 74 // input/output error + CodeTempFail = 75 // temp failure; user is invited to retry + CodeProtocol = 76 // remote error in protocol + CodeNoPerm = 77 // permission denied + CodeConfig = 78 // configuration error + +) + +var ( + notPermittedError = errors.New(translations.T.Sprintf("Not permitted")) +) + +func checkFlagsError(err error) { + e := err.(*flags.Error) + switch e.Type { + case flags.ErrUnknown: + state.AddError(translations.T.Sprintf("flag error unknown")).Exit() + case flags.ErrExpectedArgument: + state.AddError(translations.T.Sprintf("expected argument")).Exit() + case flags.ErrUnknownFlag: + state.AddError(translations.T.Sprintf("unknown flag")).Exit() + case flags.ErrUnknownGroup: + state.AddError(translations.T.Sprintf("unknown group")).Exit() + case flags.ErrMarshal: + state.AddError(translations.T.Sprintf("marshal")).Exit() + case flags.ErrHelp: + state.Exit() + case flags.ErrNoArgumentForBool: + state.AddError(translations.T.Sprintf("no argument for bool")).Exit() + case flags.ErrRequired: + state.Exit() + case flags.ErrShortNameTooLong: + state.AddError(translations.T.Sprintf("short name too long")).Exit() + case flags.ErrDuplicatedFlag: + state.AddError(translations.T.Sprintf("duplicated flag")).Exit() + case flags.ErrTag: + state.AddError(translations.T.Sprintf("tag %s", err.Error())).Exit() + case flags.ErrCommandRequired: + state.Exit() + case flags.ErrUnknownCommand: + state.AddError(translations.T.Sprintf("unknown command")).Exit() + case flags.ErrInvalidChoice: + state.AddError(translations.T.Sprintf("invalid choice")).Exit() + case flags.ErrInvalidTag: + state.AddError(translations.T.Sprintf("invalid tag")).Exit() + default: + state.AddError(translations.T.Sprintf("unrecognized error type")).Exit() + + } +} + +func CheckError(err error) { + if err == nil { + return + } + + switch err.(type) { + case *flags.Error: + checkFlagsError(err) + } + + ExitWithError(1, "Unknown Error: %s", err.Error()) +} diff --git a/application/source/commands/03_messages.go b/application/source/commands/03_messages.go new file mode 100644 index 0000000..0581ad7 --- /dev/null +++ b/application/source/commands/03_messages.go @@ -0,0 +1,42 @@ +package commands + +import ( + "github.com/gookit/color" + "gitlab.schukai.com/oss/utilities/documentation-manager/translations" + "strings" +) + +func PrintMessages() { + + const indent = " " + + if len(state.errors) > 0 { + color.Error.Println(strings.ToUpper(translations.T.Sprintf("Error")) + ":") + } + + for _, message := range state.errors { + color.Error.Println(indent + message) + } + + if len(state.warnings) > 0 { + color.Warn.Println(strings.ToUpper(translations.T.Sprintf("Warn")) + ":") + } + + for _, message := range state.warnings { + color.Warn.Println(indent + message) + } + + if len(state.messages) > 0 { + color.Info.Println(strings.ToUpper(translations.T.Sprintf("Info")) + ":") + } + + for _, message := range state.messages { + color.Info.Println(indent + message) + } + + // reset + state.messages = []string{} + state.warnings = []string{} + state.errors = []string{} + +} diff --git a/application/source/commands/03_terminal.go b/application/source/commands/03_terminal.go new file mode 100644 index 0000000..948d119 --- /dev/null +++ b/application/source/commands/03_terminal.go @@ -0,0 +1,10 @@ +package commands + +import "github.com/jessevdk/go-flags" + +type TerminalStateStruct struct { + parser *flags.Parser + definition *Definition +} + +var terminalState TerminalStateStruct diff --git a/application/source/commands/06_definitions.go b/application/source/commands/06_definitions.go new file mode 100644 index 0000000..a25596c --- /dev/null +++ b/application/source/commands/06_definitions.go @@ -0,0 +1,6 @@ +package commands + +type Definition struct { + Version VersionDefinition `command:"version" alias:"v"` + Document DocumentDefinition `command:"document" alias:"d"` +} diff --git a/application/source/commands/07_execute.go b/application/source/commands/07_execute.go new file mode 100644 index 0000000..5168d7b --- /dev/null +++ b/application/source/commands/07_execute.go @@ -0,0 +1,61 @@ +package commands + +import ( + "github.com/jessevdk/go-flags" + "gitlab.schukai.com/oss/utilities/documentation-manager/translations" + "strings" +) + +func Execute(Info Info) { + + state.info = Info + + initTerminalState() + initCommands() + + _, err := terminalState.parser.Parse() + CheckError(err) + + a := terminalState.parser.Command.Active + if a == nil { + ExitWithError(1, "No active command found") + } + + queue := []string{} + runCommand(queue, terminalState.parser.Command.Active) + +} + +func initTerminalState() { + + definition := &Definition{} + parser := flags.NewParser(definition, flags.Default) + + parser.ShortDescription = translations.T.Sprintf("This program can be used to create documentation for your project.") + parser.LongDescription = translations.T.Sprintf("This program can be used to create documentation for your project.\nIt can be used to create a new documentation project,\nadd new documentation to an existing project, or to generate\ndocumentation from a source code project.") + + terminalState = TerminalStateStruct{ + parser: parser, + definition: definition, + } + +} + +func runCommand(queue []string, activeCommand *flags.Command) { + + queue = append(queue, activeCommand.Name) + + if activeCommand.Active != nil { + runCommand(queue, activeCommand.Active) + return + } + + k := strings.Join(queue, "-") + + if handler, ok := handlers.executor[k]; ok { + execute := handler.execute + execute(activeCommand) + } else { + ExitWithError(1, "handler %s not found", k) + } +} diff --git a/application/source/commands/08_document.go b/application/source/commands/08_document.go new file mode 100644 index 0000000..1aa4920 --- /dev/null +++ b/application/source/commands/08_document.go @@ -0,0 +1,35 @@ +package commands + +import ( + "github.com/jessevdk/go-flags" + "gitlab.schukai.com/oss/utilities/documentation-manager/translations" +) + +func init() { + + h := handler{ + init: initDocument, + } + + handlers.executor["document"] = h + +} + +type DocumentDefinition struct { + Path string `long:"path" short:"p" default:"."` + Add DocumentAddDefinition `command:"add" alias:"a"` +} + +func initDocument(command *flags.Command) { + const text = "Functions for creating and editing documents" + command.ShortDescription = translations.T.Sprintf(text) + command.LongDescription = translations.T.Sprintf(text) + + for _, opt := range command.Options() { + switch opt.LongName { + case "path": + opt.Description = translations.T.Sprintf("base directory in which the documents are saved") + } + } + +} diff --git a/application/source/commands/08_document_add.go b/application/source/commands/08_document_add.go new file mode 100644 index 0000000..4eacd9d --- /dev/null +++ b/application/source/commands/08_document_add.go @@ -0,0 +1,106 @@ +package commands + +import ( + "fmt" + "github.com/jessevdk/go-flags" + "gitlab.schukai.com/oss/utilities/documentation-manager/translations" +) + +const documentAddSymbol = "document-add" + +// language: md +const newDocumentTemplate = ` +--- +# Document title +Title: New Document + +# keywords mainly used for searching +Keywords: + - documentation + +# First and last name of the authors as a list +Author: + - null + +Created: %%CREATED%% +Last Update: %%CREATED%% + +... + +## {{ .Title }} + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. +` + +func init() { + + h := handler{ + init: initDocumentAdd, + execute: runDocumentAdd, + } + + handlers.executor[documentAddSymbol] = h + +} + +type DocumentAddDefinition struct { + Positional struct { + Name []string `positional-arg-name:"name" required:"yes" positional:"yes"` + } `positional-args:"yes" required:"yes"` +} + +func initDocumentAdd(command *flags.Command) { + const text = "Adds a new document" + command.ShortDescription = translations.T.Sprintf(text) + command.LongDescription = translations.T.Sprintf(text) + + for _, arg := range command.Args() { + switch arg.Name { + case "name": + arg.Description = translations.T.Sprintf("file names of the new documents, separated by spaces") + } + + } + +} + +func createNewDocument(name string) error { + + //p := path.Join(arguments.Path, arguments.Add.Name+".md") + //if fileExists(p) { + // printErrorAndExit(2, "the document with name already exists", arguments.Add.Name, p) + //} + // + //t := config.Document.Template.Add + //t = strings.Replace(t, "%%ID%%", arguments.Add.Name, -1) + //t = strings.Replace(t, "%%CREATED%%", time.Now().Format("2006-01-02"), -1) + // + //d1 := []byte(t) + //err := os.WriteFile(p, d1, 0644) + //if err != nil { + // return err + //} + // + //return nil + + return nil +} + +func runDocumentAdd(command *flags.Command) { + + t := terminalState + p := t.definition.Document.Path + fmt.Println(p) + + names := terminalState.definition.Document.Add.Positional.Name + + if len(names) == 0 { + ExitWithError(1, "no document name given") + } + + for _, name := range names { + fmt.Printf("Adding document %s\n", name) + createNewDocument(name) + } + +} diff --git a/application/source/commands/08_version.go b/application/source/commands/08_version.go new file mode 100644 index 0000000..82abbba --- /dev/null +++ b/application/source/commands/08_version.go @@ -0,0 +1,33 @@ +package commands + +import ( + "github.com/jessevdk/go-flags" + "gitlab.schukai.com/oss/utilities/documentation-manager/translations" +) + +const versionSymbol = "version" + +func init() { + + h := handler{ + init: initVersion, + execute: runVersion, + } + + handlers.executor[versionSymbol] = h + +} + +type VersionDefinition struct { +} + +func initVersion(command *flags.Command) { + const text = "Prints the version and build information" + command.ShortDescription = translations.T.Sprintf(text) + command.LongDescription = translations.T.Sprintf(text) +} + +func runVersion(command *flags.Command) { + translations.T.Printf("version: %s\n", state.info.Version) + translations.T.Printf("build: %s\n", state.info.Build) +} diff --git a/application/source/defaults.go b/application/source/defaults.go deleted file mode 100644 index 5b6b325..0000000 --- a/application/source/defaults.go +++ /dev/null @@ -1,233 +0,0 @@ -package main - -const exitOK = 0 - -// - Catchall for general errors -const exitCodeCatchAll = 1 - -// Invalid argument to exit -// const exitCodeInvalidArgument = 128 - -const defaultOverviewTemplate = ` - ---- -block-headings: true ---- - -{{ if .HasChangelog }} -## Changelog - -{{.Changelog}} - -{{ end}}{{ if .HasPrivacy }} -## Privacy - -{{.Privacy}} - -{{ end}}{{ if .HasMeta }} -## Build - -{{.Meta}} - -{{ end}}{{ if .HasTasks }} -## Tasks - -{{.Tasks}} - -{{ end}}{{ if .HasItems }} -## Items - -{{.Items}} - -{{ end}}{{ if .HasRequirements }} -## Documents - -{{.Documents}} - -{{ end}} - - -` - -// -const defaultNewRequirementTemplate = ` ---- -ID: %%ID%% -Title: null - -# Reference to other requirements -References: null - -# Display, Functional, Performance, Printing, Report, Testing or Validation -Type: null - -Alias: null - -Keywords: - - Requirement - -# First and last name of the authors as a list -Author: - - null - -# Proposed (The document has been requested by an authorized source.), -# In Progress (A business analyst is actively working on crafting the document.), -# Drafted (The initial version of the document has been written.), -# Approved (The document has been analyzed, its impact on the project has been estimated, and it has been allocated to the baseline for a specific release. ), -# Implemented (The code that implements the document has been designed, written, and unit tested. The document has been traced to the pertinent design and code elements. It’s now ready for review or other verification.), -# Verified (The document has satisfied its acceptance criteria, meaning that the correct functioning of the implemented document has been confirmed.), -# Deferred (An approved document is now planned for implementation in a later release.), -# Deleted (An approved document has been removed from the baseline.) or -# Rejected (The document was proposed but was never approved and is not planned for implementation in any upcoming release.) -Status: "Proposed" - -# Low, Medium, Hi -Complexity: null -# Low, Medium, Hi -Difficulty: null -# Nice to have, Low, Medium, Hi or Blocker -Priority: null -Version: 0.0.1 -Milestone: null - -# 0 (means that a task has already been completed), 1 (is a very small task), 2, 3, 5 (are rather smaller tasks), -# 8, 13, 20, 40, 100 -Estimation: - -# The time required for this document -# Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”. -Time Spent: - -# who is the source of the demand -Source: null -Created: %%CREATED%% -Last Update: null - -# The issues that are associated with this document -# You can add an issue by adding a new line to the list with the following format: -# - Gitlab: -# ID: <issue-id> -# -# if the issue is not yet in the project, you can add it by using the following format: -# Only the Title is required. -# - Gitlab: -# Title: <issue-title> -# Description: <issue-description> -# Priority: <issue-priority> -# Status: <issue-status> -# Assignee: <issue-assignee> -# Milestone: <issue-milestone> -# Labels: <issue-labels> -# -Issues: - - -# the individual items as a list -Items: - - ID: null - Name: null - # what is it, a image, font, legal information, access data, texts, decisions, etc. - Type: null - # does this belong to a group - group: null - Description: null - Delivery until: null - # when was the project items delivered and by whom? - Provided on: null - Provided by: null - -# https://gdpr-info.eu/art-30-gdpr/ -Privacy: - - ID: null - - # Purpose of the data processing, - # for example, shipping an order and handing it over to a shipping service provider. - Purposes: null - - # More detailed description of the reason and process of data processing. - Description: null - - # Who is responsible for data protection - Contact: null - - # But working with these categories might end up being a bad idea since doing so might - # mean packing different things into one. This leads to either oversimplifications or - # a lot of specifications within a category. It might be advisable to split some of them - # up or to add additional ones to make them fit your business reality. - # Examples: Employees, Suppliers, Customers, Job applicants, Consultants, Visitors, Prospects, Contractors, Trainees - Affected Groups: null - - # - Category: - - # Example: 5 years from the payment of the salary - Data Retention Period: null - - # On what legal basis is the data collected - # Special legal regulation outside the GDPR - # Consent of the data subject (Art. 6 para. 1 a) DSG-VO) use Consent field - # Collective agreement (e.g. company agreement, collective agreement) - # Establishment, performance or termination of an employment relationship (nationally regulated in the BDSG) - # Contract or initiation of a contract with the data subject (Art. 6 para. 1 b) DSG-VO.) - # Balancing of interests (Art. 6 para. 1 f) DSG-VO): Please name the overriding interests - Legal Basis: null - - # “Consent” of the data subject refers to any freely given specific, informed and unambiguous indication of his or - # her wishes in the form of a statement or other unambiguous affirmative act by which the data subject signifies - # his or her agreement to personal data relating to him or her being processed. - Consent: null - - # Where applicable, transfers of personal data to a third country or an international organisation, including - # the identification of that third country or international organisation and, in the case of transfers referred - # to in the second subparagraph of Article 49(1), the documentation of suitable safeguards; - Transfers: - - # Where possible, a general description of the technical and organisational - # security measures referred to in Article 32(1). - TOM: null - -... - -### {{ .Title }} - {{ .ID }} - -#### Subheading - -- [ ] task 1 -- [ ] task 2 - - -{{ if .Items }} -#### Items - -| ID | Name | Delivery until | Provided on | -|--------------------|--------------|----------------------:|-----------------------------------------:| -{{ range .Items - }}| {{ .ID }} | {{ .Name }} | {{ .DeliveryUntil.Format "02.Jan" }} | {{ .ProvidedOn.Format "02.Jan" }} | -{{ end }} - -{{ end }} - -{{ if .Privacy }} -#### Privacy - -{{ range .Privacy }} -{{ if .Purposes }}**{{ .Purposes }}** {{ end }}**({{ .ID }})** - -{{ if .Description }} {{ .Description }} -{{ end }} -| | | -|-----------------------|----------------------------| -| Category | {{ .Category }} | -| Data Retention Period | {{ .DataRetentionPeriod }} | -| Legal Basis | {{ .LegalBasis }} | -| Transfers | {{ .Transfers }} | -{{ end }} - -{{ end }} - - - - - - -` diff --git a/application/source/documents.go b/application/source/documents.go deleted file mode 100644 index 8aef5d7..0000000 --- a/application/source/documents.go +++ /dev/null @@ -1,142 +0,0 @@ -package main - -import ( - "bytes" - "os" - "path" - "reflect" - "strconv" - "strings" - "time" - - "gopkg.in/yaml.v3" - - "github.com/olekukonko/tablewriter" -) - -type document struct { - ToDos []task `yaml:"-"` - Absolute string `yaml:"-"` - File string `yaml:"-"` - - // remember the node structure of yaml - OriginNode *yaml.Node `yaml:"-"` - OriginText string `yaml:"-"` - - Name string `yaml:"Name"` - References []string `yaml:"References"` - Keywords []string `yaml:"Keywords"` - Author []string `yaml:"Author"` - Version string `yaml:"Version"` - Created time.Time `yaml:"Created"` - LastUpdate time.Time `yaml:"Last Update"` -} - -func addDocument() error { - - if arguments.Documents.Add.Name == "" { - printErrorAndExit(2, "the name must not be empty") - } - - p := path.Join(arguments.Path, arguments.Documents.Add.Name+".md") - if fileExists(p) { - printErrorAndExit(2, "the request with id already exists", arguments.Documents.Add.Name, p) - } - - t := config.Requirement.Template.Add - t = strings.Replace(t, "%%ID%%", arguments.Documents.Add.Name, -1) - t = strings.Replace(t, "%%CREATED%%", time.Now().Format("2006-01-02"), -1) - - d1 := []byte(t) - err := os.WriteFile(p, d1, 0644) - if err != nil { - return err - } - - return nil -} - -func buildRequirements(pageMap map[string]*document) (error, string, bool) { - - hasRequirements := false - - buf := new(bytes.Buffer) - table := tablewriter.NewWriter(buf) - - translateMetaColumns := translateHeaders(config.Requirement.Table.Columns) - - table.SetHeader(translateMetaColumns) - table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) - table.SetCenterSeparator("|") - - var tableData [][]string - - for _, pd := range pageMap { - - r := reflect.ValueOf(pd) - - var row []string - found := false - for _, name := range config.Requirement.Table.Columns { - - field := reflect.Indirect(r).FieldByName(name) - if field == (reflect.Value{}) { - row = append(row, printer.Sprintf("no value")) - continue - } - - t := field.Type() - - switch t.Name() { - case "string": - found = true - row = append(row, field.String()) - case "Duration": - found = true - t := field.Interface().(time.Duration) - row = append(row, t.String()) - case "Time": - found = true - t := field.Interface().(time.Time) - if t.IsZero() { - row = append(row, "—") - } else { - row = append(row, field.Interface().(time.Time).Format(config.Locale.DateFormat)) - } - case "int": - found = true - row = append(row, strconv.FormatInt(field.Int(), 10)) - case "float64": - found = true - row = append(row, strconv.FormatFloat(field.Float(), 'f', 10, 2)) - case "nil": - row = append(row, field.String()) - case "bool": - found = true - expr := field.Bool() - if expr { - row = append(row, "true") - } else { - row = append(row, "false") - } - - default: - row = append(row, printer.Sprintf("unsuported type", t.Name())) - } - - } - - if found { - tableData = append(tableData, row) - hasRequirements = true - } - - } - - table.AppendBulk(tableData) // Add Bulk Data - table.SetHeaderAlignment(tablewriter.ALIGN_LEFT) - table.Render() - - return nil, buf.String(), hasRequirements - -} diff --git a/application/source/go.mod b/application/source/go.mod index ddd4660..2cce3db 100644 --- a/application/source/go.mod +++ b/application/source/go.mod @@ -1,49 +1,12 @@ -module gitlab.schukai.com/oss/utilities/requirements-manager +module gitlab.schukai.com/oss/utilities/documentation-manager go 1.18 -require ( - github.com/go-git/go-git/v5 v5.4.2 - github.com/gookit/color v1.5.1 - github.com/jessevdk/go-flags v1.5.0 - github.com/olekukonko/tablewriter v0.0.5 - github.com/xanzy/go-gitlab v0.68.0 - golang.org/x/text v0.3.7 - gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.1 -) +require golang.org/x/text v0.3.7 require ( - github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20220517143526-88bb52951d5b // indirect - github.com/acomagu/bufpipe v1.0.3 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emirpasic/gods v1.18.1 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.3.1 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-querystring v1.1.0 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-retryablehttp v0.7.1 // indirect - github.com/imdario/mergo v0.3.13 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/kr/pretty v0.2.1 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/rivo/uniseg v0.2.0 // indirect - github.com/sergi/go-diff v1.2.0 // indirect - github.com/src-d/gcfg v1.4.0 // indirect - github.com/xanzy/ssh-agent v0.3.1 // indirect + github.com/gookit/color v1.5.1 // indirect + github.com/jessevdk/go-flags v1.5.0 // indirect github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 // indirect - golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/net v0.0.0-20220621193019-9d032be2e588 // indirect - golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb // indirect - golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect - golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.0 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect + golang.org/x/sys v0.0.0-20220702020025-31831981b65f // indirect ) diff --git a/application/source/go.sum b/application/source/go.sum index ab243f5..952c2d7 100644 --- a/application/source/go.sum +++ b/application/source/go.sum @@ -1,546 +1,19 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/ProtonMail/go-crypto v0.0.0-20220517143526-88bb52951d5b h1:lcbBNuQhppsc7A5gjdHmdlqUqJfgGMylBdGyDs0j7G8= -github.com/ProtonMail/go-crypto v0.0.0-20220517143526-88bb52951d5b/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= -github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git v4.7.0+incompatible h1:+W9rgGY4DOKKdX2x6HxSR7HNeTxqiKrOvKnuittYVdA= -github.com/go-git/go-git v4.7.0+incompatible/go.mod h1:6+421e08gnZWn30y26Vchf7efgYLe4dl5OQbBSUXShE= -github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= -github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= -github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gookit/color v1.5.0 h1:1Opow3+BWDwqor78DcJkJCIwnkviFi+rrOANki9BUFw= -github.com/gookit/color v1.5.0/go.mod h1:43aQb+Zerm/BWh2GnrgOQm7ffz7tvQXEKV6BFMl7wAo= 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/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= -github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= 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/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= -github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= -github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/src-d/gcfg v1.4.0 h1:xXbNR5AlLSA315x2UO+fTSSAXCDf+Ar38/6oyGbDKQ4= -github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/xanzy/go-gitlab v0.68.0 h1:b2iMQHgZ1V+NyRqLRJVv6RFfr4xnd/AASeS/PETYL0Y= -github.com/xanzy/go-gitlab v0.68.0/go.mod h1:o4yExCtdaqlM8YGdDJWuZoBmfxBsmA9TPEjs9mx1UO4= -github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= -github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= -github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo= -github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w= 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.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -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-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= -golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220615171555-694bf12d69de h1:ogOG2+P6LjO2j55AkRScrkB2BFpd+Z8TY2wcM0Z3MGo= -golang.org/x/net v0.0.0-20220615171555-694bf12d69de/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220621193019-9d032be2e588 h1:9ubFuySsnAJYGyJrZ3koiEv8FyqofCBdz3G9Mbf2YFc= -golang.org/x/net v0.0.0-20220621193019-9d032be2e588/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= -golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/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-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886 h1:eJv7u3ksNXoLbGSKuv2s/SIO4tJVxc/A+MTpzxDgz/Q= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU= -golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +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/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220411224347-583f2d630306 h1:+gHMid33q6pen7kv9xvT+JRinntgeXO2AeZVd0AWD3w= -golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/src-d/go-billy.v4 v4.3.2 h1:0SQA1pRztfTFx2miS8sA97XvooFeNOmvUenF4o0EcVg= -gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= -gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= -gopkg.in/src-d/go-git.v4 v4.13.1 h1:SRtFyV8Kxc0UP7aCHcijOMQGPxHSmMOPrzulQWolkYE= -gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -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 h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99 h1:dbuHpmKjkDzSOMKAWl10QNlgaZUd3V1q99xc81tt2Kc= -gopkg.in/yaml.v3 v3.0.0-20220512140231-539c8e751b99/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/application/source/main.go b/application/source/main.go index 98a6733..8c8e606 100644 --- a/application/source/main.go +++ b/application/source/main.go @@ -1,50 +1,31 @@ package main import ( - "os" - - "golang.org/x/text/language" - "golang.org/x/text/message" + "gitlab.schukai.com/oss/utilities/documentation-manager/commands" ) -// Wird beim Bauen per +// Used when building per // -ldflags "-X main.version=$app_version -X main.build=$(due --iso-8601 | tr -d "-" )" -// gesetzt var ( version string = "dev" build string = "dev" - printer *message.Printer - //sugar *zap.SugaredLogger ) -var serverLangs = []language.Tag{ - language.English, // en fallback - language.German, // de -} - -var matcher = language.NewMatcher(serverLangs) - -var userPrefs = []language.Tag{ - language.Make(os.Getenv("LANG")), - language.Make("en"), -} - -func init() { - - initEnvironment() - - tag, _, _ := matcher.Match(userPrefs...) - printer = message.NewPrinter(tag) - - initL10n() - -} - -func initEnvironment() { -} - /** */ func main() { - executeCommand() + + defer func() { + if r := recover(); r != nil && + r != commands.ExitWithCodeSymbol { + panic(r) + } + commands.Exit() + }() + + commands.Execute(commands.Info{ + Version: version, + Build: build, + }) + } diff --git a/application/source/overview.go b/application/source/overview.go deleted file mode 100644 index 0db49c2..0000000 --- a/application/source/overview.go +++ /dev/null @@ -1,284 +0,0 @@ -package main - -import ( - "io/ioutil" - "os" - "path" - "path/filepath" - "regexp" - "sort" - "strings" - "text/template" - "time" -) - -type Dataset struct { - Config *Configuration - Meta string - HasChangelog bool - Changelog string - HasPrivacy bool - Privacy string - HasMeta bool - Tasks string - HasTasks bool - Items string - HasItems bool - Requirements string - HasRequirements bool - Created time.Time - CreatedFormat string -} - -func PrintOverview() error { - - err, pageData := collectStructureFromFiles(config.Path) - if err != nil { - return err - } - - err, meta, hasMeta := buildRequirements(pageData) - if err != nil { - return err - } - - err, changelog, hasChangelog := buildChangelog(pageData) - if err != nil { - return err - } - - err, tasks, hasTasks := buildTasksTable(pageData, false) - if err != nil { - return err - } - - t, err := template.New("overview").Parse(config.Overview.Template.Internal.MarkdownContent) - if err != nil { - return err - } - - requirements := "" - - keys := make([]string, 0, len(pageData)) - for k := range pageData { - keys = append(keys, k) - } - - sort.Strings(keys) - - hasRequirements := false - for _, k := range keys { - hasRequirements = true - p := pageData[k] - requirements = requirements + getAdjustedContent(p.Absolute) - } - - d := new(Dataset) - - d.Changelog = changelog - d.HasChangelog = hasChangelog - - d.Meta = meta - d.HasMeta = hasMeta - - d.Tasks = tasks - d.HasTasks = hasTasks - - d.Requirements = requirements - d.HasRequirements = hasRequirements - - d.Config = config - d.Created = time.Now() - d.CreatedFormat = time.Now().Format(config.Locale.DateFormat) - //d.document = document - - outputName := arguments.Build.Print.Output - - if arguments.Build.Print.Format == "pdf" { - - if outputName == "" { - printErrorAndExit(2, "if the type is pdf, the output option must be specified") - } - - file, err := ioutil.TempFile(os.TempDir(), "reqman") - if err != nil { - printErrorAndExit(2, "A temporary file cannot be created", err.Error()) - } - defer os.Remove(file.Name()) - - err = t.Execute(file, d) - if err != nil { - return err - } - - convertToPDF(file.Name(), outputName, config.Overview.Template.Latex) - - } else { - - if outputName != "" { - file, err := os.Create(outputName) - if err != nil { - printErrorAndExit(2, "The output file cannot be written", err.Error()) - } - - // close fo on exit and check for its returned error - defer func() { - if err := file.Close(); err != nil { - printErrorAndExit(2, "The output file cannot be written", err.Error()) - } - }() - - err = t.Execute(file, d) - if err != nil { - return err - } - - } else { - - err = t.Execute(os.Stdout, d) - if err != nil { - return err - } - } - - } - - return nil - -} - -func getAdjustedContent(absolute string) string { - - content, err := os.ReadFile(absolute) - if err != nil { - printError("The file cannot be read", absolute) - return "" - } - - err, def := splitYamlParts(content) - if err != nil { - printError(err.Error()) - return "" - } - - s := convertImages(def.content, path.Dir(absolute)) - - return s -} - -func convertImages(content string, absolute string) string { - - todoRegEx := regexp.MustCompile(`(?P<match>\!\[(?P<label>[^]]*)\]\((?P<path>[^)]*)\))`) - - matches := todoRegEx.FindAllStringSubmatch(content, -1) - if matches == nil { - return content - } - - for _, match := range matches { - result := make(map[string]string) - for i, name := range todoRegEx.SubexpNames() { - if i != 0 && name != "" { - result[name] = match[i] - } - } - - if filepath.IsAbs(result["path"]) { - continue - } - - path := path.Clean(absolute + "/" + result["path"]) - content = strings.Replace(content, result["match"], "!["+result["label"]+"]("+path+")", -1) - - } - - return content -} - -func convertTemplateLogo(content string, absolute string) string { - todoRegEx := regexp.MustCompile(`(?m)^(?P<match>logo:\s*"?(?P<path>[^"\n]*)"?\s*)$`) - - matches := todoRegEx.FindAllStringSubmatch(content, -1) - if matches == nil { - return content - } - - for _, match := range matches { - result := make(map[string]string) - for i, name := range todoRegEx.SubexpNames() { - if i != 0 && name != "" { - result[name] = match[i] - } - } - - if filepath.IsAbs(result["path"]) { - continue - } - - path := path.Clean(absolute + "/" + result["path"]) - content = strings.Replace(content, result["match"], "logo: \""+path+"\"", -1) - - } - - return content -} - -func convertTemplateLatexLogo(content string, absolute string) string { - todoRegEx := regexp.MustCompile(`(?m)(?P<match>\\includegraphics[^{]*\{(?P<path>[^}]*)\})`) - - matches := todoRegEx.FindAllStringSubmatch(content, -1) - if matches == nil { - return content - } - - for _, match := range matches { - result := make(map[string]string) - for i, name := range todoRegEx.SubexpNames() { - if i != 0 && name != "" { - result[name] = match[i] - } - } - - if filepath.IsAbs(result["path"]) { - continue - } - - path := path.Clean(absolute + "/" + result["path"]) - a := strings.Replace(result["match"], result["path"], path, -1) - - content = strings.Replace(content, result["match"], a, -1) - - } - - return content -} - -func convertTemplateImages(content string, absolute string) string { - content = convertTemplateLogo(content, absolute) - content = convertTemplateLatexLogo(content, absolute) - - return content - -} - -func validateColumns(columns []string) []string { - - //for i, column := range columns { - // columns[i] = printer.Sprintf(column) - //} - - // VALIDATE COLUMS NAME - - // - //for _, name := range config.Documents.Columns { - // - // field := reflect.Indirect(r).FieldByName(name) - // if field == (reflect.Value{}) { - // printError("the specified column " + name + " for the table does not exist") - // continue - - // } - - return columns - -} diff --git a/application/source/translations/catalog.go b/application/source/translations/catalog.go new file mode 100644 index 0000000..34454b8 --- /dev/null +++ b/application/source/translations/catalog.go @@ -0,0 +1,113 @@ +// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. + +package translations + +import ( + "golang.org/x/text/language" + "golang.org/x/text/message" + "golang.org/x/text/message/catalog" +) + +type dictionary struct { + index []uint32 + data string +} + +func (d *dictionary) Lookup(key string) (data string, ok bool) { + p, ok := messageKeyToIndex[key] + if !ok { + return "", false + } + start, end := d.index[p], d.index[p+1] + if start == end { + return "", false + } + return d.data[start:end], true +} + +func init() { + dict := map[string]catalog.Dictionary{ + "de": &dictionary{index: deIndex, data: deData}, + "en": &dictionary{index: enIndex, data: enData}, + } + fallback := language.MustParse("en") + cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback)) + if err != nil { + panic(err) + } + message.DefaultCatalog = cat +} + +var messageKeyToIndex = map[string]int{ + "Error": 0, + "Info": 2, + "No active command found": 19, + "Not permitted": 3, + "This program can be used to create documentation for your project.": 20, + "This program can be used to create documentation for your project. It can be used to create a new documentation project, add new documentation to an existing project, or to generate documentation from a source code project.": 21, + "Unknown Error: %s": 18, + "Warn": 1, + "build: %s\n": 30, + "duplicated flag": 12, + "expected argument": 5, + "flag error unknown": 4, + "handler %s not found": 22, + "invalid choice": 15, + "invalid tag": 16, + "long document": 24, + "long document add": 26, + "long version": 28, + "marshal": 8, + "no argument for bool": 9, + "required": 10, + "short document": 23, + "short document add": 25, + "short name too long": 11, + "short version": 27, + "tag": 13, + "unknown command": 14, + "unknown flag": 6, + "unknown group": 7, + "unrecognized error type": 17, + "version: %s\n": 29, +} + +var deIndex = []uint32{ // 32 elements + 0x00000000, 0x00000007, 0x0000000f, 0x00000014, + 0x00000014, 0x00000014, 0x00000014, 0x00000014, + 0x00000014, 0x00000014, 0x00000014, 0x00000014, + 0x00000014, 0x00000014, 0x00000014, 0x00000014, + 0x00000014, 0x00000014, 0x00000014, 0x00000014, + 0x00000014, 0x00000014, 0x00000014, 0x00000014, + 0x00000014, 0x00000014, 0x00000014, 0x00000014, + 0x00000014, 0x00000014, 0x00000014, 0x00000014, +} // Size: 152 bytes + +const deData string = "\x02Fehler\x02Warnung\x02Info" + +var enIndex = []uint32{ // 32 elements + 0x00000000, 0x00000006, 0x0000000b, 0x00000010, + 0x0000001e, 0x00000031, 0x00000043, 0x00000050, + 0x0000005e, 0x00000066, 0x0000007b, 0x00000084, + 0x00000098, 0x000000a8, 0x000000ac, 0x000000bc, + 0x000000cb, 0x000000d7, 0x000000ef, 0x00000104, + 0x0000011c, 0x0000015f, 0x0000023f, 0x00000257, + 0x00000266, 0x00000274, 0x00000287, 0x00000299, + 0x000002a7, 0x000002b4, 0x000002c8, 0x000002da, +} // Size: 152 bytes + +const enData string = "" + // Size: 730 bytes + "\x02Error\x02Warn\x02Info\x02Not permitted\x02flag error unknown\x02expe" + + "cted argument\x02unknown flag\x02unknown group\x02marshal\x02no argument" + + " for bool\x02required\x02short name too long\x02duplicated flag\x02tag" + + "\x02unknown command\x02invalid choice\x02invalid tag\x02unrecognized err" + + "or type\x02Unknown Error: %[1]s\x02No active command found\x02This progr" + + "am can be used to create documentation for your project.\x02This program" + + " can be used to create documentation for your project. It can be used to" + + " create a new documentation project, add new documentation to an existin" + + "g project, or to generate documentation from a source code project.\x02h" + + "andler %[1]s not found\x02short document\x02long document\x02short docum" + + "ent add\x02long document add\x02short version\x02long version\x04\x00" + + "\x01\x0a\x0f\x02version: %[1]s\x04\x00\x01\x0a\x0d\x02build: %[1]s" + + // Total table size 1054 bytes (1KiB); checksum: 2EA20D06 diff --git a/application/source/translations/locales/de/messages.gotext.json b/application/source/translations/locales/de/messages.gotext.json new file mode 100644 index 0000000..8b66a4d --- /dev/null +++ b/application/source/translations/locales/de/messages.gotext.json @@ -0,0 +1,34 @@ +{ + "language": "de", + "messages": [ + { + "id": "Error: {Arg_1}", + "message": "Error: {Arg_1}", + "translation": "Fehler: {Arg_1}", + "placeholders": [ + { + "id": "Arg_1", + "string": "%[1]s", + "type": "", + "underlyingType": "string", + "argNum": 1 + } + ] + }, + { + "id": "Error", + "message": "Error", + "translation": "Fehler" + }, + { + "id": "Warn", + "message": "Warn", + "translation": "Warnung" + }, + { + "id": "Info", + "message": "Info", + "translation": "Info" + } + ] +} \ No newline at end of file diff --git a/application/source/translations/locales/de/out.gotext.json b/application/source/translations/locales/de/out.gotext.json new file mode 100644 index 0000000..7027e2a --- /dev/null +++ b/application/source/translations/locales/de/out.gotext.json @@ -0,0 +1,198 @@ +{ + "language": "de", + "messages": [ + { + "id": "Not permitted", + "message": "Not permitted", + "translation": "" + }, + { + "id": "flag error unknown", + "message": "flag error unknown", + "translation": "" + }, + { + "id": "expected argument", + "message": "expected argument", + "translation": "" + }, + { + "id": "unknown flag", + "message": "unknown flag", + "translation": "" + }, + { + "id": "unknown group", + "message": "unknown group", + "translation": "" + }, + { + "id": "marshal", + "message": "marshal", + "translation": "" + }, + { + "id": "no argument for bool", + "message": "no argument for bool", + "translation": "" + }, + { + "id": "required", + "message": "required", + "translation": "" + }, + { + "id": "short name too long", + "message": "short name too long", + "translation": "" + }, + { + "id": "duplicated flag", + "message": "duplicated flag", + "translation": "" + }, + { + "id": "tag", + "message": "tag", + "translation": "" + }, + { + "id": "unknown command", + "message": "unknown command", + "translation": "" + }, + { + "id": "invalid choice", + "message": "invalid choice", + "translation": "" + }, + { + "id": "invalid tag", + "message": "invalid tag", + "translation": "" + }, + { + "id": "unrecognized error type", + "message": "unrecognized error type", + "translation": "" + }, + { + "id": "Unknown Error: {Arg_1}", + "message": "Unknown Error: {Arg_1}", + "translation": "", + "placeholders": [ + { + "id": "Arg_1", + "string": "%[1]s", + "type": "", + "underlyingType": "string", + "argNum": 1 + } + ] + }, + { + "id": "Error", + "message": "Error", + "translation": "Fehler" + }, + { + "id": "Warn", + "message": "Warn", + "translation": "Warnung" + }, + { + "id": "Info", + "message": "Info", + "translation": "Info" + }, + { + "id": "No active command found", + "message": "No active command found", + "translation": "" + }, + { + "id": "This program can be used to create documentation for your project.", + "message": "This program can be used to create documentation for your project.", + "translation": "" + }, + { + "id": "This program can be used to create documentation for your project. It can be used to create a new documentation project, add new documentation to an existing project, or to generate documentation from a source code project.", + "message": "This program can be used to create documentation for your project. It can be used to create a new documentation project, add new documentation to an existing project, or to generate documentation from a source code project.", + "translation": "" + }, + { + "id": "handler {Arg_1} not found", + "message": "handler {Arg_1} not found", + "translation": "", + "placeholders": [ + { + "id": "Arg_1", + "string": "%[1]s", + "type": "", + "underlyingType": "string", + "argNum": 1 + } + ] + }, + { + "id": "short document", + "message": "short document", + "translation": "" + }, + { + "id": "long document", + "message": "long document", + "translation": "" + }, + { + "id": "short document add", + "message": "short document add", + "translation": "" + }, + { + "id": "long document add", + "message": "long document add", + "translation": "" + }, + { + "id": "short version", + "message": "short version", + "translation": "" + }, + { + "id": "long version", + "message": "long version", + "translation": "" + }, + { + "id": "version: {Version}", + "message": "version: {Version}", + "translation": "", + "placeholders": [ + { + "id": "Version", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "state.info.Version" + } + ] + }, + { + "id": "build: {Build}", + "message": "build: {Build}", + "translation": "", + "placeholders": [ + { + "id": "Build", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "state.info.Build" + } + ] + } + ] +} \ No newline at end of file diff --git a/application/source/translations/locales/en/out.gotext.json b/application/source/translations/locales/en/out.gotext.json new file mode 100644 index 0000000..04d827f --- /dev/null +++ b/application/source/translations/locales/en/out.gotext.json @@ -0,0 +1,260 @@ +{ + "language": "en", + "messages": [ + { + "id": "Not permitted", + "message": "Not permitted", + "translation": "Not permitted", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "flag error unknown", + "message": "flag error unknown", + "translation": "flag error unknown", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "expected argument", + "message": "expected argument", + "translation": "expected argument", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "unknown flag", + "message": "unknown flag", + "translation": "unknown flag", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "unknown group", + "message": "unknown group", + "translation": "unknown group", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "marshal", + "message": "marshal", + "translation": "marshal", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "no argument for bool", + "message": "no argument for bool", + "translation": "no argument for bool", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "required", + "message": "required", + "translation": "required", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "short name too long", + "message": "short name too long", + "translation": "short name too long", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "duplicated flag", + "message": "duplicated flag", + "translation": "duplicated flag", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "tag", + "message": "tag", + "translation": "tag", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "unknown command", + "message": "unknown command", + "translation": "unknown command", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "invalid choice", + "message": "invalid choice", + "translation": "invalid choice", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "invalid tag", + "message": "invalid tag", + "translation": "invalid tag", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "unrecognized error type", + "message": "unrecognized error type", + "translation": "unrecognized error type", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Unknown Error: {Arg_1}", + "message": "Unknown Error: {Arg_1}", + "translation": "Unknown Error: {Arg_1}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Arg_1", + "string": "%[1]s", + "type": "", + "underlyingType": "string", + "argNum": 1 + } + ], + "fuzzy": true + }, + { + "id": "Error", + "message": "Error", + "translation": "Error", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Warn", + "message": "Warn", + "translation": "Warn", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "Info", + "message": "Info", + "translation": "Info", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "No active command found", + "message": "No active command found", + "translation": "No active command found", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "This program can be used to create documentation for your project.", + "message": "This program can be used to create documentation for your project.", + "translation": "This program can be used to create documentation for your project.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "This program can be used to create documentation for your project. It can be used to create a new documentation project, add new documentation to an existing project, or to generate documentation from a source code project.", + "message": "This program can be used to create documentation for your project. It can be used to create a new documentation project, add new documentation to an existing project, or to generate documentation from a source code project.", + "translation": "This program can be used to create documentation for your project. It can be used to create a new documentation project, add new documentation to an existing project, or to generate documentation from a source code project.", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "handler {Arg_1} not found", + "message": "handler {Arg_1} not found", + "translation": "handler {Arg_1} not found", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Arg_1", + "string": "%[1]s", + "type": "", + "underlyingType": "string", + "argNum": 1 + } + ], + "fuzzy": true + }, + { + "id": "short document", + "message": "short document", + "translation": "short document", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "long document", + "message": "long document", + "translation": "long document", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "short document add", + "message": "short document add", + "translation": "short document add", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "long document add", + "message": "long document add", + "translation": "long document add", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "short version", + "message": "short version", + "translation": "short version", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "long version", + "message": "long version", + "translation": "long version", + "translatorComment": "Copied from source.", + "fuzzy": true + }, + { + "id": "version: {Version}", + "message": "version: {Version}", + "translation": "version: {Version}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Version", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "state.info.Version" + } + ], + "fuzzy": true + }, + { + "id": "build: {Build}", + "message": "build: {Build}", + "translation": "build: {Build}", + "translatorComment": "Copied from source.", + "placeholders": [ + { + "id": "Build", + "string": "%[1]s", + "type": "string", + "underlyingType": "string", + "argNum": 1, + "expr": "state.info.Build" + } + ], + "fuzzy": true + } + ] +} \ No newline at end of file diff --git a/application/source/translations/translations.go b/application/source/translations/translations.go new file mode 100644 index 0000000..e1168f0 --- /dev/null +++ b/application/source/translations/translations.go @@ -0,0 +1,59 @@ +package translations + +//go:generate gotext -srclang=en update -out=catalog.go -lang=en,de gitlab.schukai.com/oss/utilities/documentation-manager + +import ( + "golang.org/x/text/language" + "golang.org/x/text/message" + "os" + "strings" +) + +var T *L10n + +func init() { + T = &L10n{} + T.init() +} + +type L10n struct { + tag language.Tag + printer *message.Printer +} + +func (t *L10n) Printf(format string, args ...interface{}) { + t.GetPrinter().Printf(format, args...) +} + +func (t *L10n) Sprintf(format string, args ...interface{}) string { + return t.GetPrinter().Sprintf(format, args...) +} + +func (t *L10n) GetPrinter() *message.Printer { + if t.printer == nil { + t.printer = message.NewPrinter(t.tag) + } + return t.printer +} + +func (t *L10n) init() { + + defer func() { + if r := recover(); r != nil { + t.tag = language.English + } + }() + + lang := os.Getenv("LANGUAGE") + if lang == "" { + lang = os.Getenv("LANG") + } + + parts := strings.Split(lang, ".") + if len(parts) > 0 { + lang = parts[0] + } + + t.tag = language.MustParse(lang) + +} diff --git a/development/examples/example1/doc.pdf b/development/examples/example1/doc.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8ad413ac277a4914b5ee448a41c55a20194435cb GIT binary patch literal 15229 zcmY!laB<T$)HCH$ee&V$4=zIs1p|frq%1BQ8-2IToRZWceYc#%l2n(}<ouLWeV^34 z^pXq(LjxltJ3Fr8lA_eaT&{{+ZzIq4Nt^TRd#?F~X>rFA7taHS+8Ht%?=<}i`?BF% zTCpde<<qaueM^3R?y;S{%|mRr0nd4lNB`9)O*(7NeC#B<kBhM7?I~w}uIBlpdH=ll z{`Y;)-pVH^M72CP`|)ClfX>d06G?2vH9vlzv)ogz*HHZLp@YKvIdhfg>^GMCXIW?P zzQ0vniea|1!_&@b6MfrLQe&S=wyLT8e6*1Hd9tW;|G9&ak*7be?DBNAnY+z(iH?|# zOH0X%regg!oOR-{S!>b)W*<GXd9&bQqpXVAljg9hTn^k4=PuSUOMyEmpkdyrE&pC! z-~H>I`uXq+tS7{#eTq}t^RIlt+xD|IQvMCT44&PY%w|o^%MYkM$h~pq$=*ZH#1E&* z^~!Eo`Lz4yr0?8UzGP@V?Y^wIvM_32#A&hk^<9BqI5#}_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azaEX}RLRtG7>=zqjuZ<9SdQ zaW3pX(~HB?7i@ntzv14j*cs-hdJX%HS!X=|lFRYFQn5VY-n*9FKc#oPKXXs`k*>V* zy;Hi5>!-hnUUl)`g!g~LU)Ha#+<QQ3$>NQA;oXvNu9w^>O^>aL{U0^;f!>7q?+X&c z8}7euz55|)N8^9igTldEFzZ+|W3);(A}BRYKPW%HM8QzOKp{xqGcPS)!3e^1iMBCJ zPBut0HMB@hH8L|XH%d%NHBU@ROEWP}GBmU>FiEx}tRhxFII}91%gjVSJlasfNWmx; zUmb30io94u^}HuvQ-VOt#XJ{5fkLr4&nu6#9^3noVcsR<m#j9dpPt^|6Qa8Hh1f)s ztw*Nn<|Hsydpuwf7x2BOq{7Nwl;AAK^}r!e)g)PbTGoD_uL(=fT@R68CE&=Jw8D{r zcZIWL)P)wamVidSGYj}*UmRp`Gic%LN#x3&vHJTNxi9t4Ry9w{S9@#nYevbnA6b_I oC%c>NV^^v#59U|F4B6t6#G;alqSQ1lLlX-#LoQWSSARDy0C*fdqW}N^ literal 0 HcmV?d00001 diff --git a/development/examples/example1/feature-1.md b/development/examples/example1/feature-1.md index 87ec592..ee172b6 100644 --- a/development/examples/example1/feature-1.md +++ b/development/examples/example1/feature-1.md @@ -1,13 +1,63 @@ + --- +# Document title +Title: New Document + +# keywords mainly used for searching +Keywords: +- Document + +# First and last name of the authors as a list +Author: +- Me + +Created: 2022-07-01 +Last Update: 2022-07-01 + +Language: de -Last Updated: 2020-01-01 ... -# First Feature +### {{ .Title }} + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. + + + +- [ ] do it +- [ ] 2022-12-01 do it + + +Name | Age +--------|------ +Bob || +Alice | 23 +========|====== +Total | 23 + +{#id3 .myclass fontsize="tiny"} +# Header 1 + + +```go +func getTrue() bool { + return true +} +``` + +Cat +: Fluffy animal everyone likes + +Internet +: Vector of transmission for pictures of cats + + +This is a footnote.[^1] + +[^1]: the footnote text. + -This is the first feature of the application. +https://www.schukai.com/ -- [ ] task 1 -- [ ] tast 2 -- [x] 2022-12-13 task 3 with due date +--strike through-- diff --git a/development/examples/example1/feature-2.md b/development/examples/example1/feature-2.md new file mode 100644 index 0000000..1f61286 --- /dev/null +++ b/development/examples/example1/feature-2.md @@ -0,0 +1,64 @@ + +--- +# Document title +Title: New Document 2 + +# keywords mainly used for searching +Keywords: +- Document +- HTML +- Markdown + +# First and last name of the authors as a list +Author: +- null + +Created: 2022-07-02 +Last Update: 2022-07-02 + +Language: en + +... + +### {{ .Title }} + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. + + + +- [ ] do it +- [ ] 2022-12-01 do it + + +Name | Age +--------|------ +Bob || +Alice | 23 +========|====== +Total | 23 + +{#id3 .myclass fontsize="tiny"} +# Header 1 + + +```go +func getTrue() bool { + return true +} +``` + +Cat +: Fluffy animal everyone likes + +Internet +: Vector of transmission for pictures of cats + + +This is a footnote.[^1] + +[^1]: the footnote text. + + +https://www.schukai.com/ + +--strike through-- diff --git a/application/source/changelog.go b/development/temp/changelog.go similarity index 88% rename from application/source/changelog.go rename to development/temp/changelog.go index c73465b..fd4fa6f 100644 --- a/application/source/changelog.go +++ b/development/temp/changelog.go @@ -8,15 +8,16 @@ import ( type logs []string -func buildChangelog(pageMap map[string]*document) (error, string, bool) { +func buildChangelog(pageMap map[string]*documentContent) (error, string, bool) { changelog := make(map[string]logs) datemap := make(map[string]string) for _, q := range pageMap { - p := *q + s := *q + p := s.meta - title := strings.Trim(p.Name, " ") + title := strings.Trim(p.Title, " ") if title == "" { title = printer.Sprintf("Untitled") } diff --git a/application/source/commandline.go b/development/temp/commandline.go similarity index 58% rename from application/source/commandline.go rename to development/temp/commandline.go index 3c60302..e5cb29a 100644 --- a/application/source/commandline.go +++ b/development/temp/commandline.go @@ -28,6 +28,11 @@ func executeCommand() { config.Path = arguments.Path } + arguments.Path, err = filepath.Abs(arguments.Path) + if err != nil { + printErrorAndExit(2, "Unknown Error", err.Error()) + } + if arguments.DateFormat != "" { config.Locale.DateFormat = arguments.DateFormat } @@ -62,40 +67,51 @@ func executeCommand() { } } - case "document": - subcommand := activeCommand.Active - switch subcommand.Name { - case "add": - config.Requirement.Template.Add = defaultNewRequirementTemplate - err := addDocument() - if err != nil { - printErrorAndExit(2, err.Error()) - } + case "add": + if config.Document.Template.Add == "" { + config.Document.Template.Add = defaultNewDocumentTemplate + } + + err := addDocument() + if err != nil { + printErrorAndExit(2, err.Error()) } case "build": + subcommand := activeCommand.Active switch subcommand.Name { - case "print": + case "html": - if len(arguments.Build.Print.Columns) > 0 { - config.Requirement.Table.Columns = validateColumns(arguments.Build.Print.Columns) + if arguments.Build.HTML.TemplatePath != "" { + config.HTML.Template.Internal.HTMLContent = readTemplate(arguments.Build.HTML.TemplatePath) + } else if config.HTML.Template.HTML != "" { + config.HTML.Template.Internal.HTMLContent = readTemplate(config.HTML.Template.HTML) + } else { + config.HTML.Template.Internal.HTMLContent = defaultHTMLTemplate } - if arguments.Build.Print.TemplatePath != "" { - config.Overview.Template.Internal.MarkdownContent = readTemplate(arguments.Build.Print.TemplatePath) - } else if config.Overview.Template.Markdown != "" { - config.Overview.Template.Internal.MarkdownContent = readTemplate(config.Overview.Template.Markdown) + err := createHTML() + if err != nil { + printErrorAndExit(2, err.Error()) + } + + case "pdf": + + if arguments.Build.PDF.TemplatePath != "" { + config.PDF.Template.Internal.MarkdownContent = readTemplate(arguments.Build.PDF.TemplatePath) + } else if config.PDF.Template.Markdown != "" { + config.PDF.Template.Internal.MarkdownContent = readTemplate(config.PDF.Template.Markdown) } else { - config.Overview.Template.Internal.MarkdownContent = defaultOverviewTemplate + config.PDF.Template.Internal.MarkdownContent = defaultPDFTemplate } - if arguments.Build.Print.LatexTemplatePath != "" { - config.Overview.Template.Latex = arguments.Build.Print.LatexTemplatePath + if arguments.Build.PDF.LatexTemplatePath != "" { + config.PDF.Template.Latex = arguments.Build.PDF.LatexTemplatePath } - err := PrintOverview() + err := CreatePDF() if err != nil { printErrorAndExit(2, err.Error()) } diff --git a/development/temp/commandlineoptions.go b/development/temp/commandlineoptions.go new file mode 100644 index 0000000..4baf862 --- /dev/null +++ b/development/temp/commandlineoptions.go @@ -0,0 +1,31 @@ +package main + +type commandLineOptions struct { + Config string `short:"c" long:"config" description:"file with configuration values"` + Path string `short:"p" long:"path" description:"define the path where the specifications are located" default:"."` + DateFormat string `long:"date-format" description:"date format" default:"2006-01-02"` + Add struct { + Name string `short:"n" long:"name" description:"name of the document"` + } `command:"add"` + Tasks struct { + Print struct { + } `command:"print"` + } `command:"tasks"` + Changelog struct { + Print struct { + } `command:"print"` + } `command:"changelog"` + Build struct { + PDF struct { + TemplatePath string `short:"t" long:"template" description:"file name of the template of the pages"` + Output string `short:"o" long:"output" description:"output file name"` + LatexTemplatePath string `short:"l" long:"latex-template-path" description:"latex template"` + } `command:"pdf"` + HTML struct { + TemplatePath string `short:"t" long:"template" description:"file name of the template of a html page"` + Output string `short:"o" long:"output" description:"output directory"` + } `command:"html"` + } `command:"build"` + Version struct { + } `command:"version"` +} diff --git a/application/source/config.go b/development/temp/config.go similarity index 82% rename from application/source/config.go rename to development/temp/config.go index 26fd3db..abacd27 100644 --- a/application/source/config.go +++ b/development/temp/config.go @@ -17,7 +17,7 @@ type configPathsStruct struct { var ( configPaths = configPathsStruct{ - main: "/etc/requirements-manager/config.yaml", + main: "/etc/documentations-manager/config.yaml", } ) @@ -29,28 +29,30 @@ type Configuration struct { DateFormat string `yaml:"DateFormat"` } `yaml:"Locale"` - Gitlab struct { - Token string `yaml:"Token"` - } `yaml:"Gitlab"` - - Overview struct { + PDF struct { Template struct { Markdown string `yaml:"Markdown"` Latex string `yaml:"Latex"` Internal struct { MarkdownContent string - } + } `yaml:"-"` + } `yaml:"Template"` + } `yaml:"PDF"` + + HTML struct { + Template struct { + HTML string `yaml:"HTML"` + Internal struct { + HTMLContent string + } `yaml:"-"` } `yaml:"Template"` - } `yaml:"Build"` + } - Requirement struct { - Table struct { - Columns []string `yaml:"Columns"` - } `yaml:"Table"` + Document struct { Template struct { Add string `yaml:"Add"` } `yaml:"Template"` - } `yaml:"Requirement"` + } `yaml:"Document"` } func fileExists(name string) (found bool) { @@ -74,7 +76,7 @@ func NewConfiguration(argConfigPath string) *Configuration { usr, err := user.Current() if err == nil { - configPaths.user = usr.HomeDir + "/.config/requirements-manager/config.yaml" + configPaths.user = usr.HomeDir + "/.config/documentations-manager/config.yaml" } if argConfigPath != "" { diff --git a/development/temp/dataset.go b/development/temp/dataset.go new file mode 100644 index 0000000..b1dbc32 --- /dev/null +++ b/development/temp/dataset.go @@ -0,0 +1,80 @@ +package main + +import ( + "sort" + "time" +) + +type Dataset struct { + Config *Configuration + Meta string + HasMeta bool + HasChangelog bool + Changelog string + Tasks string + HasTasks bool + Documents string + HasDocuments bool + Created time.Time + CreatedFormat string + Description string + HasDescription bool + Title string + HasTitle bool + keys []string +} + +const flagInitChangelog = 1 +const flagInitTasks = 2 +const flagInitDocuments = 4 + +func getDataset(pageData map[string]*documentContent, flags int) (*Dataset, error) { + + keys := make([]string, 0, len(pageData)) + for k := range pageData { + keys = append(keys, k) + } + + sort.Strings(keys) + + d := &Dataset{} + + d.keys = keys + + if flags&flagInitChangelog != 0 { + err, changelog, hasChangelog := buildChangelog(pageData) + if err != nil { + return nil, err + } + d.Changelog = changelog + d.HasChangelog = hasChangelog + } + + if flags&flagInitTasks != 0 { + err, tasks, hasTasks := buildTasksTable(pageData, false) + if err != nil { + return nil, err + } + + d.Tasks = tasks + d.HasTasks = hasTasks + } + + if flags&flagInitDocuments != 0 { + documents := "" + + for _, k := range d.keys { + d.HasDocuments = true + p := pageData[k].meta + documents = documents + convertToHtml(getAdjustedContent(p.Absolute)) + } + + d.Documents = documents + } + + d.Config = config + d.Created = time.Now() + d.CreatedFormat = time.Now().Format(config.Locale.DateFormat) + + return d, nil +} diff --git a/development/temp/defaults.go b/development/temp/defaults.go new file mode 100644 index 0000000..6888cf4 --- /dev/null +++ b/development/temp/defaults.go @@ -0,0 +1,69 @@ +package main + +const exitOK = 0 + +const exitCodeCatchAll = 1 + +// language: html +const defaultHTMLTemplate = `<!DOCTYPE html> +{{ if .HasLanguage }} +<html lang="{{.Language}}"> +{{ else }} +<html> +{{ end }} +<head> + <meta charset="UTF-8"/> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name='viewport' + content='width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no'> + <title>{{.Title}}</title> + {{if .HasCanonical }} + <link rel="canonical" href="{{.Canonical}}"> + {{end}} + {{if .HasDescription }} + <meta name="description" content="{{.Description}}"> + {{end}} + + <style> + body { + padding: 0px; + margin: 0px; + } + </style> +</head> +<body> +{{ if .HasBody }}{{.Body}}{{ end }} +</body> +</html>` + +const defaultPDFTemplate = ` +<!DOCTYPE html> +<html lang="de"> +<head> + +<body> +--- +block-headings: true +... + +{{ if .HasChangelog }} +## Changelog + +{{.Changelog}} + +{{ end}}{{ if .HasTasks }} +## Tasks + +{{.Tasks}} + +{{ end}}{{ if .HasDocuments }} +## Documents + +{{.Documents}} + +{{ end}} + +</body> +</html> + +` diff --git a/development/temp/documents.go b/development/temp/documents.go new file mode 100644 index 0000000..0684d55 --- /dev/null +++ b/development/temp/documents.go @@ -0,0 +1,54 @@ +package main + +import ( + "os" + "path" + "strings" + "time" + + "gopkg.in/yaml.v3" +) + +type document struct { + ToDos []task `yaml:"-"` + 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 time.Time `yaml:"Created"` + LastUpdate time.Time `yaml:"Last Update"` + Language string `yaml:"Language"` +} + +func addDocument() error { + + if arguments.Add.Name == "" { + printErrorAndExit(2, "the name must not be empty") + } + + p := path.Join(arguments.Path, arguments.Add.Name+".md") + if fileExists(p) { + printErrorAndExit(2, "the document with name already exists", arguments.Add.Name, p) + } + + t := config.Document.Template.Add + t = strings.Replace(t, "%%ID%%", arguments.Add.Name, -1) + t = strings.Replace(t, "%%CREATED%%", time.Now().Format("2006-01-02"), -1) + + d1 := []byte(t) + err := os.WriteFile(p, d1, 0644) + if err != nil { + return err + } + + return nil +} diff --git a/application/source/errors.go b/development/temp/errors.go similarity index 100% rename from application/source/errors.go rename to development/temp/errors.go diff --git a/application/source/files.go b/development/temp/files.go similarity index 89% rename from application/source/files.go rename to development/temp/files.go index 8cbd8ea..afb290e 100644 --- a/application/source/files.go +++ b/development/temp/files.go @@ -11,11 +11,11 @@ import ( "gopkg.in/yaml.v3" ) -func collectStructureFromFiles(directory string) (error, map[string]*document) { +func collectStructureFromFiles(directory string) (error, map[string]*documentContent) { cleanedDirectory, err := filepath.Abs(path.Clean(directory)) - pageMap := make(map[string]*document) + pageMap := make(map[string]*documentContent) err = filepath.Walk(cleanedDirectory, func(current string, info os.FileInfo, err error) error { @@ -50,13 +50,13 @@ func collectStructureFromFiles(directory string) (error, map[string]*document) { bp := []byte(cleanedPath) bs := string(bp[len(bd):len(bp)]) - p.data.File = "." + bs - p.data.Absolute = cleanedPath - p.data.ToDos = findTask(content) + p.meta.File = "." + bs + p.meta.Absolute = cleanedPath + p.meta.ToDos = findTask(content) k := cleanedPath - pageMap[k] = &p.data + pageMap[k] = &p return nil }) diff --git a/development/temp/html.go b/development/temp/html.go new file mode 100644 index 0000000..48686c6 --- /dev/null +++ b/development/temp/html.go @@ -0,0 +1,149 @@ +package main + +import ( + "fmt" + "github.com/gomarkdown/markdown" + "github.com/gomarkdown/markdown/html" + "github.com/gomarkdown/markdown/parser" + "html/template" + "os" + "path" + "time" +) + +type PageDataset struct { + Body string + HasBody bool + Created time.Time + CreatedFormat string + Updated time.Time + UpdatedFormat string + Language string + HasLanguage bool + + //Config *Configuration + //Meta string + //HasMeta bool + //HasChangelog bool + //Changelog string + //Tasks string + //HasTasks bool + //Documents string + //HasDocuments bool + //Language string + //HasLanguage bool + //Canonical string + //HasCanonical bool + //Description string + //HasDescription bool + //Title string + //HasTitle bool + //Body string + //HasBody bool + //keys []string +} + +func createHTML() error { + + err, pageData := collectStructureFromFiles(config.Path) + if err != nil { + return err + } + + dataset, err := getDataset(pageData, 0) + fmt.Println(dataset) + if err != nil { + return err + } + + for _, p := range pageData { + fmt.Println(p.text) + d := &PageDataset{ + //Created: p.created, + //CreatedFormat: p.createdFormat, + //Updated: p.updated, + //UpdatedFormat: p.updatedFormat, + //Language: p.language, + //HasLanguage: p.hasLanguage, + } + + fmt.Printf(d.CreatedFormat) + //initBody(d, pageData) + //err = createHTMLFile(p, d) + //if err != nil { + // return err + //} + } + + return nil +} + +//func initBody(d *Dataset, pageData map[string]*documentContent) { +// +// d.Body = "" +// d.HasBody = false +// +// for _, k := range d.keys { +// d.HasBody = true +// p := pageData[k].meta +// d.Body = d.Body + getAdjustedContent(p.Absolute) +// } +// +//} + +func convertToHtml(text string) string { + extensions := parser.CommonExtensions | parser.AutoHeadingIDs | parser.Footnotes | parser.SuperSubscript | parser.Includes | parser.Attributes + parser := parser.NewWithExtensions(extensions) + + htmlFlags := html.CommonFlags | html.HrefTargetBlank + opts := html.RendererOptions{Flags: htmlFlags} + renderer := html.NewRenderer(opts) + + md := []byte(text) + return string(markdown.ToHTML(md, parser, renderer)) + +} + +func createHTMLFile(p *documentContent, d *PageDataset) error { + + if d.Body == "" { + d.HasBody = false + } else { + d.HasBody = true + } + + t, err := template.New("pdf").Parse(config.PDF.Template.Internal.MarkdownContent) + if err != nil { + return err + } + + outputDir := arguments.Build.HTML.Output + if outputDir == "" { + printErrorAndExit(2, "if the type is html, the output option must be specified") + } + + if !path.IsAbs(outputDir) { + outputDir = path.Join(config.Path, outputDir) + } + + fileinfo, err := os.Stat(outputDir) + if os.IsNotExist(err) { + printErrorAndExit(2, "The file %s does not exist", outputDir) + } + if !fileinfo.IsDir() { + printErrorAndExit(2, "The file %s is not a directory", outputDir) + } + + fileName := path.Join(outputDir, ".html") + file, err := os.Create(fileName) + if err != nil { + return err + } + + err = t.Execute(file, d) + if err != nil { + return err + } + + return nil +} diff --git a/application/source/l10n.go b/development/temp/l10n.go similarity index 94% rename from application/source/l10n.go rename to development/temp/l10n.go index b4fd1fe..b42be04 100644 --- a/application/source/l10n.go +++ b/development/temp/l10n.go @@ -228,10 +228,10 @@ var l10nMap = []l10nKeyTranslation{ }, }, { - "Name", + "Title", []l10nLocaleTranslation{ - {"de", "Name"}, - {"en", "Name"}, + {"de", "Title"}, + {"en", "Title"}, }, }, { @@ -254,10 +254,10 @@ var l10nMap = []l10nKeyTranslation{ }, }, { - "the request with id already exists", + "the document with name already exists", []l10nLocaleTranslation{ - {"de", "Die Anforderung mit der ID %s existiert bereits (%s)."}, - {"en", "the request with id %s already exists (%s)."}, + {"de", "Das Dokument mit dem Namen %s existiert bereits (%s)."}, + {"en", "The document named %s already exists (%s)."}, }, }, { @@ -274,6 +274,13 @@ var l10nMap = []l10nKeyTranslation{ {"en", "if the type is pdf, the output option must be specified"}, }, }, + { + "if the type is html, the output option must be specified", + []l10nLocaleTranslation{ + {"de", "Der Tpy HTML benötigt die Option --output"}, + {"en", "if the type is html, the output option must be specified"}, + }, + }, { "Unknown Error", []l10nLocaleTranslation{ diff --git a/development/temp/main.go b/development/temp/main.go new file mode 100644 index 0000000..98a6733 --- /dev/null +++ b/development/temp/main.go @@ -0,0 +1,50 @@ +package main + +import ( + "os" + + "golang.org/x/text/language" + "golang.org/x/text/message" +) + +// Wird beim Bauen per +// -ldflags "-X main.version=$app_version -X main.build=$(due --iso-8601 | tr -d "-" )" +// gesetzt +var ( + version string = "dev" + build string = "dev" + printer *message.Printer + //sugar *zap.SugaredLogger +) + +var serverLangs = []language.Tag{ + language.English, // en fallback + language.German, // de +} + +var matcher = language.NewMatcher(serverLangs) + +var userPrefs = []language.Tag{ + language.Make(os.Getenv("LANG")), + language.Make("en"), +} + +func init() { + + initEnvironment() + + tag, _, _ := matcher.Match(userPrefs...) + printer = message.NewPrinter(tag) + + initL10n() + +} + +func initEnvironment() { +} + +/** + */ +func main() { + executeCommand() +} diff --git a/application/source/message.go b/development/temp/message.go similarity index 100% rename from application/source/message.go rename to development/temp/message.go diff --git a/application/source/pandoc.go b/development/temp/pandoc.go similarity index 83% rename from application/source/pandoc.go rename to development/temp/pandoc.go index 95ebac5..83e5011 100644 --- a/application/source/pandoc.go +++ b/development/temp/pandoc.go @@ -5,7 +5,7 @@ import ( "os/exec" ) -func convertToPDF(source string, outputName string, latexPath string) string { +func runPandoc(source string, outputName string, latexPath string) string { arguments := "/bin/env pandoc " @@ -21,6 +21,10 @@ func convertToPDF(source string, outputName string, latexPath string) string { arguments += "--template=" + latexPath + " " } + if luaRawBlockFile != nil { + arguments += "--lua-filter=" + luaRawBlockFile.Name() + " " + } + arguments += "--columns=5 " arguments += "--highlight-style espresso " arguments += "--toc " diff --git a/development/temp/pdf.go b/development/temp/pdf.go new file mode 100644 index 0000000..0f3e3d6 --- /dev/null +++ b/development/temp/pdf.go @@ -0,0 +1,190 @@ +package main + +import ( + "io/ioutil" + "os" + "path" + "path/filepath" + "regexp" + "strings" + "text/template" +) + +func CreatePDF() error { + + err, pageData := collectStructureFromFiles(config.Path) + if err != nil { + return err + } + + d, err := getDataset(pageData, flagInitChangelog|flagInitTasks|flagInitDocuments) + if err != nil { + return err + } + + outputName := arguments.Build.PDF.Output + + if outputName == "" { + printErrorAndExit(2, "if the type is pdf, the output option must be specified") + } + + file, err := ioutil.TempFile(os.TempDir(), "docman") + if err != nil { + printErrorAndExit(2, "A temporary file cannot be created", err.Error()) + } + defer os.Remove(file.Name()) + + t, err := template.New("pdf").Parse(config.PDF.Template.Internal.MarkdownContent) + if err != nil { + return err + } + + err = t.Execute(file, d) + if err != nil { + return err + } + + createLuaFile() + runPandoc(file.Name(), outputName, config.PDF.Template.Latex) + + if luaRawBlockFile != nil { + luaRawBlockFile.Close() + } + + return nil + +} + +var luaRawBlockFile *os.File + +func createLuaFile() { + var err error + + luaRawBlockFile, err = ioutil.TempFile(os.TempDir(), "lua-raw-block") + if err != nil { + printErrorAndExit(2, "A temporary file cannot be created", err.Error()) + } + + luaRawBlockFile.WriteString(` +function RawBlock (raw) + return raw.format:match 'html' + and pandoc.read(raw.text, 'html').blocks + or raw +end +`) + +} + +func getAdjustedContent(absolute string) string { + + content, err := os.ReadFile(absolute) + if err != nil { + printError("The file cannot be read", absolute) + return "" + } + + err, def := splitYamlParts(content) + if err != nil { + printError(err.Error()) + return "" + } + + s := convertImages(def.text, path.Dir(absolute)) + + return s +} + +func convertImages(content string, absolute string) string { + + todoRegEx := regexp.MustCompile(`(?P<match>\!\[(?P<label>[^]]*)\]\((?P<path>[^)]*)\))`) + + matches := todoRegEx.FindAllStringSubmatch(content, -1) + if matches == nil { + return content + } + + for _, match := range matches { + result := make(map[string]string) + for i, name := range todoRegEx.SubexpNames() { + if i != 0 && name != "" { + result[name] = match[i] + } + } + + if filepath.IsAbs(result["path"]) { + continue + } + + path := path.Clean(absolute + "/" + result["path"]) + content = strings.Replace(content, result["match"], "!["+result["label"]+"]("+path+")", -1) + + } + + return content +} + +func convertTemplateLogo(content string, absolute string) string { + todoRegEx := regexp.MustCompile(`(?m)^(?P<match>logo:\s*"?(?P<path>[^"\n]*)"?\s*)$`) + + matches := todoRegEx.FindAllStringSubmatch(content, -1) + if matches == nil { + return content + } + + for _, match := range matches { + result := make(map[string]string) + for i, name := range todoRegEx.SubexpNames() { + if i != 0 && name != "" { + result[name] = match[i] + } + } + + if filepath.IsAbs(result["path"]) { + continue + } + + path := path.Clean(absolute + "/" + result["path"]) + content = strings.Replace(content, result["match"], "logo: \""+path+"\"", -1) + + } + + return content +} + +func convertTemplateLatexLogo(content string, absolute string) string { + todoRegEx := regexp.MustCompile(`(?m)(?P<match>\\includegraphics[^{]*\{(?P<path>[^}]*)\})`) + + matches := todoRegEx.FindAllStringSubmatch(content, -1) + if matches == nil { + return content + } + + for _, match := range matches { + result := make(map[string]string) + for i, name := range todoRegEx.SubexpNames() { + if i != 0 && name != "" { + result[name] = match[i] + } + } + + if filepath.IsAbs(result["path"]) { + continue + } + + path := path.Clean(absolute + "/" + result["path"]) + a := strings.Replace(result["match"], result["path"], path, -1) + + content = strings.Replace(content, result["match"], a, -1) + + } + + return content +} + +func convertTemplateImages(content string, absolute string) string { + content = convertTemplateLogo(content, absolute) + content = convertTemplateLatexLogo(content, absolute) + + return content + +} diff --git a/application/source/run.go b/development/temp/run.go similarity index 100% rename from application/source/run.go rename to development/temp/run.go diff --git a/application/source/tasks.go b/development/temp/tasks.go similarity index 93% rename from application/source/tasks.go rename to development/temp/tasks.go index bac3781..52eeca3 100644 --- a/application/source/tasks.go +++ b/development/temp/tasks.go @@ -72,7 +72,7 @@ func findTask(content []byte) []task { return toDos } -func buildTasksTable(pageMap map[string]*document, extended bool) (error, string, bool) { +func buildTasksTable(pageMap map[string]*documentContent, extended bool) (error, string, bool) { buf := new(bytes.Buffer) @@ -94,7 +94,10 @@ func buildTasksTable(pageMap map[string]*document, extended bool) (error, string var tableData [][]string - for _, pageData := range pageMap { + for _, pageDoc := range pageMap { + + pageData := pageDoc.meta + for _, info := range pageData.ToDos { has = true diff --git a/application/source/util.go b/development/temp/util.go similarity index 77% rename from application/source/util.go rename to development/temp/util.go index f373198..46abce5 100644 --- a/application/source/util.go +++ b/development/temp/util.go @@ -11,12 +11,12 @@ import ( "gopkg.in/yaml.v3" ) -type contentRequirement struct { - content string - data document +type documentContent struct { + text string + meta document } -func splitYamlParts(content []byte) (error, contentRequirement) { +func splitYamlParts(content []byte) (error, documentContent) { origin := string(content) @@ -28,15 +28,15 @@ func splitYamlParts(content []byte) (error, contentRequirement) { t := strings.TrimSpace(origin) if len(t) == 0 { - return errors.New("the file is empty"), contentRequirement{ - content: origin, - data: document{}, + return errors.New("the file is empty"), documentContent{ + text: origin, + meta: document{}, } } - return errors.New("the file does not contain a definition block"), contentRequirement{ - content: origin, - data: document{}, + return errors.New("the file does not contain a definition block"), documentContent{ + text: origin, + meta: document{}, } } @@ -55,7 +55,7 @@ func splitYamlParts(content []byte) (error, contentRequirement) { a, b, found = strings.Cut(remaining, "---") if !found { - return errors.New("the file does not contain a definition block"), contentRequirement{} + return errors.New("the file does not contain a definition block"), documentContent{} } } @@ -68,35 +68,35 @@ func splitYamlParts(content []byte) (error, contentRequirement) { t, err := template.New("overview").Parse(text) if err != nil { - return err, contentRequirement{} + return err, documentContent{} } var node yaml.Node err = yaml.Unmarshal([]byte(meta), &node) if err != nil { - return err, contentRequirement{} + return err, documentContent{} } data := document{} err = node.Decode(&data) if err != nil { - return err, contentRequirement{} + return err, documentContent{} } - req := contentRequirement{} - req.data = data + req := documentContent{} + req.meta = data - req.data.OriginNode = &node - req.data.OriginText = text + req.meta.OriginNode = &node + req.meta.OriginText = text var buffer bytes.Buffer err = t.Execute(&buffer, data) if err != nil { printError(err.Error()) - return err, contentRequirement{} + return err, documentContent{} } - req.content = buffer.String() + req.text = buffer.String() return nil, req -- GitLab