[
  {
    "path": ".github/workflows/maven.yml",
    "content": "name: Java CI\n\non: [push]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v1\n    - name: Set up JDK 1.8\n      uses: actions/setup-java@v1\n      with:\n        java-version: 1.8\n    - name: Build with Maven\n      run: mvn -B package --file pom.xml\n"
  },
  {
    "path": ".gitignore",
    "content": "**/bin/\n**/.preprocessed_src/\n**/pkg/\n**/target/\npom.xml.tag\npom.xml.releaseBackup\npom.xml.versionsBackup\npom.xml.next\nrelease.properties\ndependency-reduced-pom.xml\nbuildNumber.properties\n.mvn/timing.properties\n**/nbproject/\n/mvn-golang-examples/mvn-golang-example-gomobile/classes/\n/mvn-golang-examples/mvn-golang-example-gomobile/test-classes/\n/mvn-golang-examples/mvn-golang-example-antlr/generated/\n**/nbactions.xml\n**/.idea\n*.iml\n.settings\n.project\n.classpath\n"
  },
  {
    "path": ".projectKnowledge/doc_common.mmd",
    "content": "Mind Map generated by NB MindMap plugin   \n> __version__=`1.1`,showJumps=`true`\n---\n\n# MVN\\-GOLANG<br/>2\\.3\\.9\n\n## module mod aware\n> fillColor=`#B8EABC`,topicLinkUID=`1784F737589A`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n### mod\n> fillColor=`#FF9090`\n\n\n#### Define mod mode\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### provided only if defined\n> fillColor=`#F3F676`\n\n\n###### properties\n\n####### mvn\\.golang\\.module\\.mod\n\n###### \\<mod\\>vendor\\</mod\\>\n> fillColor=`#00FFFF`\n\n\n### dependency aware\n> fillColor=`#B8EABC`,topicLinkUID=`1693D4AFAAFA`\n\n\n#### scanDependencies\n> fillColor=`#FF9090`\n\n\n##### Find artifacts generated by Mvn\\-Golang among scope dependencies,<br/>unpack them and add unpacked folders into GOPATH during execution\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### true\n> fillColor=`#F3F676`\n\n\n#### includeTestDependencies\n> fillColor=`#FF9090`\n\n\n##### Include test dependencies into scanning process\\.\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### true\n> fillColor=`#F3F676`\n\n\n#### dependencyTempFolder\n> fillColor=`#FF9090`\n\n\n##### Path to the folder where resolved mvn\\-golang dependencies<br/>will be temporary unpacked\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### $\\{project\\.build\\.directory\\}/\\.\\_\\_deps\\_\\_\n> fillColor=`#F3F676`\n\n\n#### syncSessionIfModules\n> fillColor=`#FF9090`\n\n\n##### turn on session synchronization<br/>to prevent parallel processing of modules in module mode\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### true\n> fillColor=`#F3F676`\n\n\n## package aware\n> fillColor=`#B8EABC`,topicLinkUID=`1693D4A9E73A`\n\n\n### packages\n> fillColor=`#FF9090`\n\n\n#### List of packages\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<packages\\><br/>       \\<package\\>com/some/package\\</package\\><br/>       \\<package\\>com/some/packagetwo\\</package\\><br/>\\</packages\\>\n> align=`left`,fillColor=`#00FFFF`\n\n\n## common\n> fillColor=`#B8EABC`\n\n\n### arch\n> fillColor=`#FF9090`\n\n\n#### Architecture of host system\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<arch\\>windows\\</arch\\>\n> fillColor=`#00FFFF`\n\n\n### addToGoPath\n> fillColor=`#FF9090`\n\n\n#### Extra folders to be added into GOPATH\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<addToGoPath\\>                         <br/>    \\<fldr\\>$\\{basedir\\}/src2\\</fldr\\><br/>    \\<fldr\\>$\\{basedir\\}/src3\\</fldr\\><br/>\\</addToGoPath\\>                        \n> fillColor=`#00FFFF`\n\n\n### buildFlags\n> fillColor=`#FF9090`\n\n\n#### List of build flags for a Go tool\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<buildFlags\\><br/>    \\<flag\\>\\-a\\</flag\\><br/>    \\<flag\\>\\-v\\</flag\\><br/>\\</buildFlags\\>\n> align=`left`,fillColor=`#00FFFF`\n\n\n### checkSdkHash\n> fillColor=`#FF9090`\n\n\n#### Check hash for downloaded GoSDK archive\\.\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### true\n> fillColor=`#F3F676`\n\n\n###### \\<checkSdkHash\\>false\\</checkSdkHash\\>\n> fillColor=`#00FFFF`\n\n\n### connectionTimeout\n> fillColor=`#FF9090`\n\n\n#### Timeout for network connections<br/>during GoSDK loading\\.\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### milliseconds\n\n###### 60000\n> fillColor=`#F3F676`\n\n\n####### \\<connectionTimeout\\>120000\\</connectionTimeout\\>\n> fillColor=`#00FFFF`\n\n\n### disableSSLcheck\n> fillColor=`#FF9090`\n\n\n#### Disable check of SSL certificate during HTTPS request\\.\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### properties\n\n###### mvn\\.golang\\.disable\\.ssl\\.check\n\n##### false\n> fillColor=`#F3F676`\n\n\n###### \\<disableSSLcheck\\>true\\</disableSSLcheck\\>\n> fillColor=`#00FFFF`\n\n\n### disableSdkLoad\n> fillColor=`#FF9090`\n\n\n#### Allows to not load GoSDK if it is not in cache\\.<br/>Also it is active if maven session in offline mode\\.\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### false\n> fillColor=`#F3F676`\n\n\n###### \\<disableSdkLoad\\>true\\</disableSdkLoad\\>\n> fillColor=`#00FFFF`\n\n\n### env\n> fillColor=`#FF9090`\n\n\n#### Allows define environment variables\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<env\\><br/>  \\<GO111MODULE\\>off\\</GO111MODULE\\><br/>\\</env\\>\n> align=`left`,fillColor=`#00FFFF`\n\n\n### errLogFile\n> fillColor=`#FF9090`\n\n\n#### File to save console error log\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<errLogFile\\>err\\.txt\\</errLogFile\\>\n> fillColor=`#00FFFF`\n\n\n### exec\n> fillColor=`#FF9090`\n\n\n#### Go tool to be executed\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### go\n> fillColor=`#F3F676`\n\n\n###### \\<exec\\>cgo\\</exec\\>\n> fillColor=`#00FFFF`\n\n\n### enforceGoPathToEnd\n> fillColor=`#FF9090`\n\n\n#### Make GOPATH value as the last one in new generated GOPATH chain\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### false\n> fillColor=`#F3F676`\n\n\n###### \\<enforceGoPathToEnd\\>true\\</enforceGoPaathToEnd\\>\n> fillColor=`#00FFFF`\n\n\n### execSubpath\n> fillColor=`#FF9090`\n\n\n#### Sub\\-path to executing go tool in SDK folder\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### bin\n> fillColor=`#F3F676`\n\n\n###### \\<execSubpath\\>bin/sub\\</execSubpath\\>\n> fillColor=`#00FFFF`\n\n\n### echo\n> fillColor=`#FF9090`\n\n\n#### Messages to be printed as INFO into log\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<echo\\><br/>  \\<echo\\>Hello world\\</echo\\><br/>\\</echo\\>\n> align=`left`,fillColor=`#00FFFF`\n\n\n### echoWarn\n> fillColor=`#FF9090`\n\n\n#### Messages to be printed as WARNING into log\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<echoWarn\\><br/>    \\<echo\\>Hello world\\</echo\\><br/>\\</echoWarn\\>\n> align=`left`,fillColor=`#00FFFF`\n\n\n### filterEnvPath\n> fillColor=`#FF9090`\n\n\n#### Flag shows that environment PATH variable should be<br/>filtered for footsteps of other go/bin folders to prevent conflicts\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### true\n> fillColor=`#F3F676`\n\n\n###### \\<filterEnvPath\\>false\\</filterEnvPath\\>\n> fillColor=`#00FFFF`\n\n\n### goPath\n> fillColor=`#FF9090`\n\n\n#### Folder to be used as $GOPATH\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### defines\n\n###### $GOPATH\n\n##### $\\{user\\.home\\}/\\.mvnGoLang/\\.go\\_path\n> fillColor=`#F3F676`\n\n\n###### \\<goPath\\>$\\{user\\.home\\}/gopath\\</goPath\\>\n> fillColor=`#00FFFF`\n\n\n### goVersion\n> fillColor=`#FF9090`\n\n\n#### Go SDK version\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### mvn\\.golang\\.go\\.version\n\n##### 1\\.18\\.3\n> fillColor=`#F3F676`\n\n\n###### \\<goVersion\\>1\\.15\\.3\\</goVersion\\>\n> fillColor=`#00FFFF`\n\n\n### goBin\n> fillColor=`#FF9090`\n\n\n#### Folder to be used as $GOBIN\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### defines\n\n###### $GOBIN\n\n##### $\\{project\\.build\\.directory\\}\n> fillColor=`#F3F676`\n\n\n###### \\<goBin\\>$\\{basedir\\}/bin\\</goBin\\>\n\n### goRoot\n> fillColor=`#FF9090`\n\n\n#### GoSDK home folder\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<goRoot\\>some/go/root\\</goRoot\\>\n> fillColor=`#00FFFF`\n\n\n### goCache\n> fillColor=`#FF9090`\n\n\n#### Cache directory to keep build data\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### defines\n\n###### $GOCACHE\n\n##### $\\{project\\.build\\.directory\\}/\\.goBuildCache\n> fillColor=`#F3F676`\n\n\n###### \\<goCache\\>off\\</goCache\\>\n> fillColor=`#00FFFF`\n\n\n### goRootBootstrap\n> fillColor=`#FF9090`\n\n\n#### Go bootstrap home folder\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### defines\n\n###### $GOROOT\\_BOOTSTRAP\n\n### hideBanner\n> fillColor=`#FF9090`\n\n\n#### Allows to hide print of plug\\-in banner\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### true\n> fillColor=`#F3F676`\n\n\n###### \\<hideBanner\\>false\\</hideBanner\\>\n> fillColor=`#00FFFF`\n\n\n### ignoreErrorExitCode\n> fillColor=`#FF9090`\n\n\n#### false\n> fillColor=`#F3F676`\n\n\n##### \\<ignoreErrorExitCode\\>true\\</ignoreErrorExitCode\\>\n> fillColor=`#00FFFF`\n\n\n### keepSdkArchive\n> fillColor=`#FF9090`\n\n\n#### false\n> fillColor=`#F3F676`\n\n\n##### \\<keepSdkArchive\\>true\\</keepSdkArchive\\>\n> fillColor=`#00FFFF`\n\n\n### keepUnarchFolderIfError\n> fillColor=`#FF9090`\n\n\n#### false\n> fillColor=`#F3F676`\n\n\n##### \\<keepUnarchFolderIfError\\>true\\</keepUnarchFolderIfError\\>\n> fillColor=`#00FFFF`\n\n\n### moduleMode\n> fillColor=`#FF9090`\n\n\n#### Manage processing of Go modules\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### false\n> fillColor=`#F3F676`\n\n\n###### properties\n\n####### mvn\\.golang\\.module\\.mode\n\n##### \\<moduleMode\\>true\\</moduleMode\\>\n> fillColor=`#00FFFF`\n\n\n### proxy\n> fillColor=`#FF9090`\n\n\n#### host\n> fillColor=`#FDB576`\n\n\n##### 127\\.0\\.0\\.1\n> fillColor=`#F3F676`\n\n\n###### \\<host\\>192\\.68\\.23\\.12\\</host\\>\n> fillColor=`#00FFFF`\n\n\n#### protocol\n> fillColor=`#FDB576`,leftSide=`true`\n\n\n##### http\n> fillColor=`#F3F676`\n\n\n###### \\<protocol\\>https\\</protocol\\>\n> fillColor=`#00FFFF`\n\n\n#### port\n> fillColor=`#FDB576`,leftSide=`true`\n\n\n##### 80\n> fillColor=`#F3F676`\n\n\n###### \\<port\\>8080\\</protocol\\>\n> fillColor=`#00FFFF`\n\n\n#### username\n> fillColor=`#FDB576`,leftSide=`true`\n\n\n##### \\<username\\>somename\\</username\\>\n> fillColor=`#00FFFF`\n\n\n#### password\n> fillColor=`#FDB576`,leftSide=`true`\n\n\n##### \\<password\\>changeme\\</password\\>\n> fillColor=`#00FFFF`\n\n\n#### nonProxyHosts\n> fillColor=`#FDB576`,leftSide=`true`\n\n\n##### \\<nonProxyHosts\\>127\\.0\\.0\\.1|localhost\\</nonProxyHosts\\>\n> fillColor=`#00FFFF`\n\n\n### useMavenProxy\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Allow use of proxy parameters<br/>provided by maven\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### true\n> fillColor=`#F3F676`\n\n\n###### \\<useMavenProxy\\>false\\</useMavenProxy\\>\n> fillColor=`#00FFFF`\n\n\n### supposeSdkArchiveFileName\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Suppose SDK archive file name if it is not presented<br/>in the list loaded from server\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### true\n> fillColor=`#F3F676`\n\n\n###### \\<supposeSdkArchiveFileName\\>false\\</supposeSdkArchiveFileName\\>\n> fillColor=`#00FFFF`\n\n\n### sdkSite\n> fillColor=`#FF9090`\n\n\n#### Base site for SDK download\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### https://storage\\.googleapis\\.com/golang/\n> fillColor=`#F3F676`\n\n\n###### \\<sdkSite\\>https://storage\\.googleapis\\.com/golang/\\</sdkSite\\>\n> fillColor=`#00FFFF`\n\n\n### skip\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Skip execution\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### properties\n\n###### each mojo processes property\n> fillColor=`#00B6FF`,mmd.emoticon=`lightbulb`\n\n\n####### mvn\\.golang\\.\\[MOJO\\_NAME\\]\\.skip\n> fillColor=`#F3F676`\n\n\n######## \\<mvn\\.golang\\.build\\.skip\\>true\\</mvn\\.golang\\.build\\.skip\\>\n> fillColor=`#00FFFF`\n\n\n##### false\n> fillColor=`#F3F676`\n\n\n###### \\<skip\\>true\\</skip\\>\n> fillColor=`#00FFFF`\n\n\n### reportsFolder\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Folder to place console logs\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### $\\{project\\.build\\.directory\\}/reports\n> fillColor=`#F3F676`\n\n\n###### \\<reportsFolder\\>$\\{basedir\\}/dir\\</reportsFolder\\>\n> fillColor=`#00FFFF`\n\n\n### outLogFile\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### File to save console out log\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<outLogFile\\>console\\.log\\</outLogFile\\>\n> fillColor=`#00FFFF`\n\n\n### storeFolder\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Folder to be used to save and unpack loaded SDKs<br/> and also keep misc info\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### $\\{user\\.home\\}/\\.mvnGoLang\n> fillColor=`#F3F676`\n\n\n###### \\<storeFolder\\>$\\{user\\.home\\}/\\.mvngo\\</storeFolder\\>\n> fillColor=`#00FFFF`\n\n\n### sources\n> fillColor=`#FF9090`\n\n\n#### Project source folder\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### $\\{project\\.build\\.sourceDirectory\\}\n> fillColor=`#F3F676`\n\n\n###### \\<sources\\>$\\{basedir\\}/src\\</sources\\>\n> fillColor=`#00FFFF`\n\n\n### sdkArchiveName\n> fillColor=`#FF9090`\n\n\n#### Allows directly define name of SDK archive\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<sdkArchiveName\\>gosdk1\\.12\\.3\\.zip\\</sdkArchiveName\\>\n> fillColor=`#00FFFF`\n\n\n### sdkDownloadUrl\n> fillColor=`#FF9090`\n\n\n#### Directly defined URL to download GoSDK\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<sdkDownloadUrl\\>https://dl\\.google\\.com/go/go1\\.13\\.darwin\\-amd64\\.tar\\.gz\\</sdkDownloadUrl\\>\n> fillColor=`#00FFFF`\n\n\n### target386\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Value to be provided as $GO386\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### defines\n\n###### $GO386\n\n##### \\<target386\\>387\\</target386\\>\n> fillColor=`#00FFFF`\n\n\n### targetArm\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Value to be provided as $GOARM\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### defines\n\n###### $GOARM\n\n##### \\<targetArm\\>6\\</targetArm\\>\n> fillColor=`#00FFFF`\n\n\n### targetOs\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Target OS information for $GOOS\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### defines\n\n###### $GOOS\n\n##### \\<targetOs\\>linux\\</targetOs\\>\n> fillColor=`#00FFFF`\n\n\n### targetArch\n> fillColor=`#FF9090`\n\n\n#### Target architecture for $GOARCH\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### defines\n\n###### $GOARCH\n\n##### \\<targetArch\\>linux\\</targetArch\\>\n> fillColor=`#00FFFF`\n\n\n### os\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Host OS information\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<os\\>windows\\</os\\>\n> fillColor=`#00FFFF`\n\n\n### osxVersion\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Data about host OSX version\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<osxVersion\\>osx10\\.8\\</osxVersion\n> fillColor=`#00FFFF`\n\n\n### verbose\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Make verbose output, also active if maven in debug\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### false\n> fillColor=`#F3F676`\n\n\n###### \\<verbose\\>true\\</verbose\\>\n> fillColor=`#00FFFF`\n\n\n### workingDir\n> fillColor=`#FF9090`\n\n\n#### Path to be used as working directory for executing process\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<workingDir\\>$\\{basedir\\}\\</workingDir\\>\n> fillColor=`#00FFFF`\n\n\n### useGoTool\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Name of tool to be called<br/>instead of standard 'go' tool\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### \\<useGoTool\\>\\</useGoTool\\>\n> fillColor=`#00FFFF`\n\n\n### useEnvVars\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n#### Find and use Go environment variables\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n##### false\n> fillColor=`#F3F676`\n\n\n###### \\<useEnvVars\\>true\\</useEnvVars\\>\n> fillColor=`#00FFFF`\n\n\n## goals\n> fillColor=`#C6C0D6`,leftSide=`true`\n\n\n### build\n> fillColor=`#B772F5`,textColor=`#FFFFFF`\n\n- TOPIC\n<pre>1784F737589A</pre>\n\n#### resultFolder\n> fillColor=`#FF9090`\n\n\n##### Target folder where to place the result file\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### $\\{project\\.build\\.directory\\}\n> fillColor=`#F3F676`\n\n\n####### \\<resultFolder\\>some/folder\\</resultFolder\\>\n\n#### resultName\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Name of the result file\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### $\\{project\\.build\\.finalName\\}\n> fillColor=`#F3F676`\n\n\n####### \\<resultName\\>someName\\</resultName\\>\n\n#### buildMode\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Build mode indicates which kind of object file is to be built\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### default\n> fillColor=`#F3F676`\n\n\n####### \\<buildMode\\>plugin\\</buildMode\\>\n\n#### strip\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Strip result file\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<strip\\>true\\</strip\\>\n\n#### ldFlags\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### List of linker flags\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<ldFlags\\><br/>    \\<flag\\>\\-X\\</flag\\><br/>    \\<flag\\>\"main\\.Buildstamp=$\\{build\\.date\\.stamp\\}\"\\</flag\\><br/>    \\<flag\\>\\-X\\</flag\\><br/>    \\<flag\\>\"main\\.svnRevision=22543\"\\</flag\\><br/>\\</ldFlags\\>\n> align=`left`\n\n\n#### attach\n> fillColor=`#FF9090`\n\n\n##### Attach the result as additional artifact to be installed and deployed\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### properties\n\n####### mvn\\.golang\\.build\\.attach\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<attach\\>true\\</attach\\>\n\n#### attachClassifier\n> fillColor=`#FF9090`\n\n\n##### Define classifier for attached artifact\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### properties\n\n####### mvn\\.golang\\.build\\.attach\\.classifier\n\n###### \\<empty\\>\n> fillColor=`#F3F676`\n\n\n####### \\<attachClassifier\\>windows\\</attachClassifier\\>\n\n#### attachType\n> fillColor=`#FF9090`\n\n\n##### Define type for attached artifact\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### properties\n\n####### mvn\\.golang\\.build\\.attach\\.type\n\n###### bin\n> fillColor=`#F3F676`\n\n\n####### \\<attachType\\>exe\\</attachType\\>\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n#### packages\n> fillColor=`#FFCC00`,leftSide=`true`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n### clean\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n\n#### cleanGoPath\n> fillColor=`#FF9090`\n\n\n##### Clean all folders provided by Go Path\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<cleanGoPath\\>true\\</cleanGoPath\\>\n\n#### deleteStoreFolder\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Delete plugin Golang store folder\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<deleteStoreFolder\\>true\\</deleteStoreFolder\\>\n\n#### packages\n> fillColor=`#FFCC00`,leftSide=`true`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n### custom\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n\n#### customCommand\n> fillColor=`#FF9090`\n\n\n##### Command for Go tool to execute\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<customCommand\\>dist\\</customCommand\\>\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n#### packages\n> fillColor=`#FFCC00`,leftSide=`true`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n### fix\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n- TOPIC\n<pre>1784F737589A</pre>\n\n#### packages\n> fillColor=`#FFCC00`,leftSide=`true`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n### fmt\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n\n#### packages\n> fillColor=`#FFCC00`,leftSide=`true`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n### generate\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n- TOPIC\n<pre>1784F737589A</pre>\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n#### packages\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n### get\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n- TOPIC\n<pre>1784F737589A</pre>\n\n#### allowLockSession\n> fillColor=`#FF9090`\n\n\n##### Enable lock maven session during operation<br/>if maven in parallel mode\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### true\n> fillColor=`#F3F676`\n\n\n####### \\<allowLockSession\\>false\\</allowLockSession\\>\n> fillColor=`#F3F676`\n\n\n#### customScript\n> fillColor=`#FF9090`\n\n\n##### Script to be called in the end of all operations over CVS\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### path\n> fillColor=`#FDB576`\n\n\n####### \\<path\\>$\\{basedir\\}/script\\.sh\\</path\\>\n\n###### options\n> fillColor=`#FDB576`\n\n\n####### \\<options\\><br/>  \\<opt\\>arg1\\</opt\\><br/>  \\<opt\\>arg2\\</opt\\><br/>\\</options\\>\n> align=`left`\n\n\n###### ignoreFail\n> fillColor=`#FDB576`\n\n\n####### \\<ignoreFail\\>false\\</ignoreFail\\>\n\n###### environment<br/>variables\n> fillColor=`#FDB576`\n\n\n####### MVNGO\\_CVS\\_BRANCH\n\n####### MVNGO\\_CVS\\_TAG\n> leftSide=`true`\n\n\n####### MVNGO\\_CVS\\_REVISION\n> leftSide=`true`\n\n\n####### MVNGO\\_CVS\\_PACKAGE\n> leftSide=`true`\n\n\n#### externalPackageFile\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Path to a file contains list of packages\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### mvn\\.golang\\.get\\.packages\\.file\n\n###### \\<externalPackageFile\\>$\\{basedir\\}/packages\\.txt\\</externalPackageFile\\>\n> fillColor=`#00FFFF`\n\n\n#### autofixGitCache\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Try to fix GIT cache error if it is detected\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<autofixGitCache\\>true\\</autofixGitCache\\>\n> fillColor=`#00FFFF`\n\n\n#### branch\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Branch to be activated\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<branch\\>v1\\.2\\.3\\</branch\\>\n> fillColor=`#00FFFF`\n\n\n#### tag\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Tag to be activated\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<tag\\>1\\.0\\.0\\</tag\\>\n> fillColor=`#00FFFF`\n\n\n#### revision\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Revision to be activated\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<revision\\>12233445\\</revision\\>\n> fillColor=`#00FFFF`\n\n\n#### customCvsOptions\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Allows to define custom options for CVS operation\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<customCvsOptions\\>                                <br/>      \\<option\\>\\-\\-paginate\\</option\\>              <br/>      \\<option\\>\\-\\-no\\-replace\\-objects\\</option\\><br/>\\</customCvsOptions\\>                               \n> fillColor=`#00FFFF`\n\n\n#### cvsExe\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Custom executable CVS file to be executed for branch,<br/>tag and revision operations\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<cvsExe\\>somecvs\\.exe\\</cvsExe\\>\n> fillColor=`#00FFFF`\n\n\n#### enforceDeletePackageFiles\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Search sources for package and its compiled version,<br/>enforce delete of found source folder and compiled '\\.a' file\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<enforceDeletePackageFiles\\>true\\</enforceDeletePackageFiles\\>\n> fillColor=`#00FFFF`\n\n\n#### deleteCommonPkg\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Delete whole common pkg folder at $GOPATH/pkg\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<deleteCommonPkg\\>true\\</deleteCommonPkg\\>\n> fillColor=`#00FFFF`\n\n\n#### relativePathToCvsFolder\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Allows directly define relative path <br/>to the package containing CVS data<br/>inside 'src' folder for package\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n#### disableCvsAutosearch\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Disable auto\\-search for CVS folder in package folder hierarchy\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<disableCvsAutosearch\\>true\\</disableCvsAutosearch\\>\n> fillColor=`#00FFFF`\n\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n#### packages\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n### list\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n- TOPIC\n<pre>1784F737589A</pre>\n\n#### format\n> fillColor=`#FF9090`\n\n\n##### alternate format for the list\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<null\\>\n> fillColor=`#F3F676`\n\n\n####### \\<format\\>\\{\\{ join \\.Deps  \"\\\\n\"\\}\\}\\</format\\>\n> fillColor=`#00FFFF`\n\n\n#### json\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### causes the package data to be printed in JSON format\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<json\\>true\\</json\\>\n> fillColor=`#00FFFF`\n\n\n#### listModules\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### causes list to list modules instead of packages\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<listModules\\>true\\</listModules\\>\n> fillColor=`#00FFFF`\n\n\n### install\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n- TOPIC\n<pre>1784F737589A</pre>\n\n#### skip\n> fillColor=`#FF9090`\n\n\n##### Skip step execution\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### maven\\.deploy\\.skip\n\n####### false\n> fillColor=`#F3F676`\n\n\n######## \\<skip\\>true\\</skip\\>\n> fillColor=`#00FFFF`\n\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n#### packages\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n### jfrog\\-cli\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n\n#### cliPath\n> fillColor=`#FF9090`\n\n\n##### Path to a JFrog CLI executable file\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<cliPath\\>$\\{basedir\\}/jfrog\\</cliPath\\>\n> fillColor=`#00FFFF`\n\n\n#### target\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### The product on which you wish to execute the command\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### rt\n> fillColor=`#F3F676`\n\n\n####### \\<target\\>rt\\</target\\>\n> fillColor=`#00FFFF`\n\n\n#### command\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### The command to execute\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### go\n> fillColor=`#F3F676`\n\n\n####### \\<command\\>go\\</command\\>\n> fillColor=`#00FFFF`\n\n\n#### arguments\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Set of arguments corresponding to the command\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<arguments\\>    <br/>    \\<arg\\>\\</arg\\><br/>    \\<arg\\>\\</arg\\><br/>\\</arguments\\>   \n> fillColor=`#00FFFF`\n\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n### mod\n> fillColor=`#00B6FF`,leftSide=`true`,textColor=`#FFFFFF`\n\n- TOPIC\n<pre>1784F737589A</pre>\n\n#### command\n> fillColor=`#FF9090`\n\n\n##### Command to be executed\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<command\\>init\\</command\\>\n> fillColor=`#00FFFF`\n\n\n#### arguments\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Optional command arguments\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<arguments\\><br/>   \\<arg\\>example\\.com/hello\\</arg\\><br/>\\</arguments\\>\n> align=`left`,fillColor=`#00FFFF`\n\n\n#### dependencies\n> fillColor=`#FFCC00`,leftSide=`true`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n### mvninstall\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n\n#### compression\n> fillColor=`#FF9090`\n\n\n##### Compression level of zip file\\. Must be 1\\.\\.9\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### 9\n> fillColor=`#F3F676`\n\n\n####### \\<compression\\>5\\</compression\\>\n> fillColor=`#00FFFF`\n\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n### run\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n- TOPIC\n<pre>1784F737589A</pre>\n\n#### xprog\n> fillColor=`#FF9090`\n\n\n##### If value is provided then \\-exec will be used with the value\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<xprog\\>some\\</xprog\\>\n> fillColor=`#00FFFF`\n\n\n#### args\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Command arguments\\. They follow package names in command line\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<args\\><br/>    \\<arg\\>\\-v\\</arg\\><br/>\\</args\\>\n> align=`left`,fillColor=`#00FFFF`\n\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n#### packages\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n### test\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n- TOPIC\n<pre>1784F737589A</pre>\n\n#### testFlags\n> fillColor=`#FF9090`\n\n\n##### List of test binary flags\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<testFlags\\><br/>    \\<flag\\>\\-test\\.cpuprofile=prof\\.out\\</flag\\><br/>\\</testFlags\\>\n> align=`left`,fillColor=`#00FFFF`\n\n\n#### skip\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Skip the step\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### properties\n\n####### maven\\.test\\.skip\n\n####### skipTests\n\n###### false\n> fillColor=`#F3F676`\n\n\n####### \\<skip\\>true\\</skip\\>\n> fillColor=`#00FFFF`\n\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n#### packages\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n### tool\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n\n#### command\n> fillColor=`#FF9090`\n\n\n##### Command to be executed\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<command\\>foo\\</command\\>\n> fillColor=`#00FFFF`\n\n\n#### args\n> fillColor=`#FF9090`,leftSide=`true`\n\n\n##### Command arguments\n> fillColor=`#92FF00`,mmd.emoticon=`information`\n\n\n###### \\<args\\><br/>    \\<arg\\>\\-a\\</arg\\><br/>    \\<arg\\>\\-v\\</arg\\><br/>\\</args\\>\n> align=`left`,fillColor=`#00FFFF`\n\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n\n### vet\n> fillColor=`#B772F5`,leftSide=`true`,textColor=`#FFFFFF`\n\n- TOPIC\n<pre>1784F737589A</pre>\n\n#### packages\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4A9E73A</pre>\n\n#### dependencies\n> fillColor=`#FFCC00`\n\n- TOPIC\n<pre>1693D4AFAAFA</pre>\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# __2.3.10 (08-jun-2022)__\n\n- updated dependencies\n- default GoSDK version is 1.19\n\n# __2.3.9 (04-jul-2021)__\n\n- fix for clean fail for multi-module project if some artifacts\n  unresolvable [#90](https://github.com/raydac/mvn-golang/issues/90)\n- fix for seldom error \"Can't create temp folder\" when building modules\n  concurrently [#88](https://github.com/raydac/mvn-golang/issues/88)\n- default GoSDK version is 1.16.5\n- added autodetect for aarch64 [#87](https://github.com/raydac/mvn-golang/issues/87)\n\n# __2.3.8 (22-mar-2021)__\n\n- improved maven archetypes\n- default GoSDK version is 1.16.2\n- added [Azul3D](https://azul3d.org/) and [Oak](https://github.com/oakmound/oak) build examples\n- added `list` mojo wrapping `go list`\n- added `mod` property for module aware commands\n- go.sum excluded from delete during build by default [#84](https://github.com/raydac/mvn-golang/issues/84)\n- minor refactoring\n\n# __2.3.7 (22-feb-2021)__\n\n- refactoring, improved informing about file log state [#83](https://github.com/raydac/mvn-golang/issues/83)\n- improved `build` mojo, added support to attach build result as project artifact[#82](https://github.com/raydac/mvn-golang/issues/82)\n- default version of GoSDK updated to 1.15.8\n- fixed slash processing in go.mod under windows [#80](https://github.com/raydac/mvn-golang/issues/80) (\n  thanks [fmazoyer](https://github.com/fmazoyer))\n\n# __2.3.6 (19-dec-2020)__\n\n- improved restoration of `go.mod` and `go.sum` state after build\n- refactoring and minor bugfixing\n- updated dependencies\n- default version of GoSDK updated to 1.15.6\n\n# __2.3.5 (12-sep-2020)__\n\n- fixed bug in go.mod backup restore [#73](https://github.com/raydac/mvn-golang/issues/73)\n- default version of GoSDK updated to 1.15.2\n\n# __2.3.4 (05-nov-2019)__\n\n- improved host arch detection [#70](https://github.com/raydac/mvn-golang/issues/70)\n- default version of GoSDK updated to 1.13.4\n- minor refactoring\n\n# __2.3.3 (30-jul-2019)__\n\n- improved work in parallel mode\n- __minimal supported JDK version increased to 1.8__\n- added `mod` mojo\n- added unified boolean properties `mvn.golang.<MOJO_NAME>.skip` to skip work of selected mojo [#65](https://github.com/raydac/mvn-golang/issues/65)\n- text `none` in `resultName` field of `build` mojo disables auto-adding of `-o` command line option\n- minor fixes and refactoring\n- added parameter `workingDir` to replace automatically choosen working directory during tool execution.\n- added support of [Golang modules]() with maven dependencies, added [example](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-maven-module-mix) [#60](https://github.com/raydac/mvn-golang/issues/60)\n- default version of GoSDK updated to 1.12.7\n\n# __2.3.2 (24-jun-2019)__\n\n- updated maven archetypes\n- fixed `mvn-golang:vet does not have maven dependency resolution` [#59](https://github.com/raydac/mvn-golang/issues/59)\n- default version of GoSDK updated to 1.12.6\n\n# __2.3.1 (14-apr-2019)__\n\n- default version of GoSDK updated to 1.12.4\n- added parameter `goCache` to provide `GOCACHE` environment variable, the default value is `${project.build.directory}/.goBuildCache`\n\n# __2.3.0 (02-mar-2019)__\n\n- __added support of work with mvn-golang dependencies in maven repository, so now they can be used as just maven dependencies, it can be disabled through `scanDependencies` property. [example](./mvn-golang-examples/mvn-golang-example-maven-repository)__\n- __repository artifact extension changed to `zip` to provide way to be processed by standard maven plugins__\n- added support of system properties 'mvngo.skip' and `mvngo.disable.ssl.check`\n- added `jfrog-cli` mojo to provide way make call to external [JFrog CLI](https://www.jfrog.com/confluence/display/CLI/JFrog+CLI) in tuned Go SDK environment, [example](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-jfrog-cli).\n- added `connectionTimeout` property to provide timeout (milliseconds) for HTTP connections, default 60000 ms\n- [#55](https://github.com/raydac/mvn-golang/issues/55) print log error stream into debug if command status is not error\n- added check of hash for downloaded SDK archive, can be disabled by `false` in parameter `checkSdkHash`, it checks hash provided in response header `x-goog-hash`\n- improved GoSDK loading\n\n# 2.2.0 (13-may-2018)\n\n- added property `mvn.golang.go.version` to define value for `goVersion` configuration parameter, it allows decrease configuration section dramatically\n- added `externalPackageFile` (property `mvn.golang.get.packages.file`) option to the `get` mojo, it allows to keep package list in external file\n- default value of the `useMavenProxy` flag is changed to __true__ to make the plugin more compatible with default maven process\n\n# 2.1.8 (29-apr-2018)\n- added support of `maven.deploy.skip` and `maven.install.skip` prperties in `install` and `deploy` mojos\n- [#48](https://github.com/raydac/mvn-golang/issues/48) improved processing of `install` and `deploy` to be more compatible with standard maven process\n- fixed dependency for [termui test project in examples](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-termui)\n- added `customScript` section into `get` to execute some custom script over package CVS folder \n\n# 2.1.7 (18-feb-2018)\n- fixed target file extension in maven archetypes [#44](https://github.com/raydac/mvn-golang/issues/44)\n- added `target386` to provide value for `$GO386` environment variable\n- improved GOPATH value processing, multi-folder value allowed\n- added flag to disable SSL certificate check for HTTPS connections, `disableSSLcheck`, by default it is `false`\n- improved Golang SDK list load [#24](https://github.com/raydac/mvn-golang/issues/24)\n- added `args` attribute to the `run` mojo to provide tail command line arguments.\n- added processing of maven session offline mode\n- improved proxy server settings processing to process NTLM authorisation\n- removed maven-enforcer-plugin because it throws NPE for old maven versions\n\n# 2.1.6 (27-aug-2017)\n- implemented file locker to synchronize SDK loading between JVM processes, if cache folder is shared\n- improved `get` mojo behavior during branch, tag and revision processing\n- improved `get` mojo, added `deleteCommonPkg` flag to delete whole common `pkg` folder, by default false\n- improved logging\n- added property `supposeSdkArchiveFileName` to suppose SDK archive file name if it is not presented in common SDK list, active by default\n- minimal version of Java increased to 1.7\n\n# 2.1.5 (03-jul-2017)\n- added archetype for multimodule project `mvn-golang-hello-multi`\n- added `customCvsOptions` into `get` mojo to provide custom options for CVS operation.\n- improved `get` mojo, added auto-search of CVS folder in package folder hierarchy, it can be disabled with `<disableCvsAutosearch>true</disableCvsAutosearch>`, #23\n- improved `get` mojo, added way to define relative path to CVS folder in `src` folder through `<relativePathToCvsFolder>`, by default the path extracted from package name\n\n# 2.1.4 (24-jun-2017)\n- added support of BAZAAR CVS (experimental)\n- fixed order of processing of CVS branch, tag and revision in `get` mojo\n- added `enforceDeletePackageFiles` flag into `get` mojo to enforce deletion of package sources and compiled version in local repository\n- fixed processing of `revision` for CVS\n\n# 2.1.3 (14-apr-2017)\n- Improved `go-hello-test` archetype to generate [Intellij Idea Go plugin project structure](https://plugins.jetbrains.com/plugin/5047-go-language-golang-org-support-plugin)\n- Added flag `enforceGoPathToEnd` to enforce changing of folder list order in new generated GOPATH\n- Added list parameter `ldFlags` for `buildMojo` to define linker flags.\n- Added boolean flag `strip` for `buildMojo` to remove symbol table and DWARF from the result file.\n- Added parameter `buildMode` for `buildMojo` to define [Go build mode](https://golang.org/cmd/go/#hdr-Description_of_build_modes)\n\n# 2.1.2 (07-nov-2016)\n- Added `skip` attribute to skip execution of mojo\n- [#10](https://github.com/raydac/mvn-golang/issues/10), Added way to disable providing of $GOBIN through pseudo-path __NONE__\n- Changed maven phase for build from `compile` to `package` (to prevent build start before tests)\n- Enforced console output for `test` even in non-verbose mode\n- Added default packages `./...` for `fmt`,`vet`,`fix` and `test` tasks\n- Added `maven.test.failure.ignore` and `test` properties processing into `test` goal, also allowed method regex template after `#` like in surefire\n\n# 2.1.1 (21-aug-2016)\n- [#9](https://github.com/raydac/mvn-golang/issues/9), Added attribute `targetArm` to provide $GOARM value\n- Added support of proxy server [#8](https://github.com/raydac/mvn-golang/issues/8), added flag `useMavenProxy` to use proxy server defined either through maven settings.xml file or the `proxy` configuration section of the plugin.\n- Improved `clean` mojo, added flags to clean Go path folder defined through `goPath` parameter, and added flag to delete whole `storeFolder`\n- Added flag `ignoreErrorExitCode` to prevent failure for error exit code, it is useful in some test cases.\n- Added parameter `reportsFolder` to define folder where some reports will be placed.\n- Added parameters `outLogFile` and `errLogFile` to save execution console log as files in the report folder. By default such reports are not saved.\n- Console log for `test` will be shown in maven log only in verbose mode\n\n# 2.1.0 (28-may-2016)\n- Output of environment variables has been moved under the `verbose` flag\n- __Added `mvninstall` goal which saves artifact into local maven repository during `install` phase,[#2 request](https://github.com/raydac/mvn-golang/issues/2)__\n- __Added support of branches and tags into `get`, it works for Git, Hg and SVN repositories__\n- Improved archetype template, added example of test\n- __Fixed issue [#3 \"cannot run tests\"](https://github.com/raydac/mvn-golang/issues/3)__\n\n# 2.0.0 (17-apr-2016)\n- __Added maven archetype `mvn-golang-hello` to generate minimal GoLang \"Hello World!\" project__\n- Added mojo for `run` command.\n- __Removed `<findExecInGoPath>` property because the logic of search executable file has been reworked__\n- Added `goBin` parameter to provide $GOBIN value\n- Improved CLEAN to delete also the project target folder\n- The Banner is hidden by default\n- __Changed project folder structure to be closer to GoLang projects__\n- __Added life-cycle for packaging `mvn-golang` with support of the standard GoLang project hierarchy, as example see adapted [the Hello world example for the case](https://github.com/raydac/mvn-golang/blob/master/mvn-golang-examples/mvn-golang-example-helloworld/pom.xml)__\n- Improved logging of command console output, now it is split to lines and every line logged separately\n- Added support for loading of archives with Content-type `application/x-gzip`\n- Increased number of test examples\n- Build of example applications moved to the special profile `examples`\n\n# 1.1.0 (05-apr-2016)\n- Added [test example for `gomobile` for Android ARM 7](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-gomobile)\n- Added `<findExecInGoPath>`, it allows to find golang tool in $GOPATH instead of $GOROOT (by default `false`)\n- Added `<echo>` and `<echoWarn>` to print echo messages into maven log\n- Added `<exec>` parameter to define gotool name (by default `go`)\n- Added `<execSubpath>` parameter to provide sub-path in SDK root to find golang tool (by default `bin`)\n- Renamed parameter `<name>` to `<resultName>` and `<target>` to `<resultFolder>` for `build`\n- Fixed racing issue for the maven `-T4` flag\n- Fixed \"Truncated TAR archive exception\" for Mac OS tar.gz archive\n- Removed predefined values for `<goVersion>` and `<osx>`\n- Minor refactoring\n\n# 1.0.0 (26-mar-2016)\n- initial version\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "![mvn-golang](assets/git_banner.png)\n\n> [!WARNING]  \n> I have archived this project because Golang has changed significantly since 2016, making maintenance too complex and costly. I am sure that Go's build process will continue to evolve, so I have started a lightweight alternative: [gosdk-wrapper-maven-plugin](https://github.com/raydac/gosdk-wrapper-maven-plugin). This new plugin is designed to provide a highly flexible mechanism that remains compatible with future changes and focuses solely on downloading GoSDK and invoking its tools. \n\n[![License Apache 2.0](https://img.shields.io/badge/license-Apache%20License%202.0-green.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![Java 8.0+](https://img.shields.io/badge/java-8.0%2b-green.svg)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)\n[![Maven central](https://maven-badges.herokuapp.com/maven-central/com.igormaznitsa/mvn-golang-wrapper/badge.svg)](http://search.maven.org/#artifactdetails|com.igormaznitsa|mvn-golang-wrapper|2.3.10|jar)\n[![Maven 3.0.3+](https://img.shields.io/badge/maven-3.0.3%2b-green.svg)](https://maven.apache.org/)\n[![PayPal donation](https://img.shields.io/badge/donation-PayPal-cyan.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AHWJHJFBAWGL2)\n[![YooMoney donation](https://img.shields.io/badge/donation-Yoo.money-blue.svg)](https://yoomoney.ru/to/41001158080699)\n\n# Changelog\n\n__ARCHIVED (03-mar-2025)__\n\n__2.3.10 (08-jun-2022)__\n\n- updated dependencies\n- default GoSDK version is 1.19\n\n__2.3.9 (04-jul-2021)__\n\n- fix for clean fail for multi-module project if some artifacts\n  unresolvable [#90](https://github.com/raydac/mvn-golang/issues/90)\n- fix for seldom error \"Can't create temp folder\" when building modules\n  concurrently [#88](https://github.com/raydac/mvn-golang/issues/88)\n- default GoSDK version is 1.16.5\n- added autodetect for aarch64 [#87](https://github.com/raydac/mvn-golang/issues/87)\n\n[full changelog](https://github.com/raydac/mvn-golang/blob/master/CHANGELOG.md)\n\n# GO start!\n__Taste Go in just two commands!__\n```\nmvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello -DarchetypeVersion=2.3.10 -DgroupId=com.go.test -DartifactId=gohello -Dversion=1.0-SNAPSHOT\nmvn -f ./gohello/pom.xml package\n```\nThe First command in th snippet above generates a maven project with some test files and the second command builds the project.\n[Also you can take a look at the example `Hello world` project using the plugin](https://github.com/raydac/mvn-golang-example)\n\nIf you want to generate a multi-module project, then you can use such snippet\n```\nmvn archetype:generate -B -DarchetypeGroupId=com.igormaznitsa -DarchetypeArtifactId=mvn-golang-hello-multi -DarchetypeVersion=2.3.10 -DgroupId=com.go.test -DartifactId=gohello-multi -Dversion=1.0-SNAPSHOT\n```\n\n# Introduction\nThe Plug-in just wraps Golang tool-chain and allows to use strong maven based infrastructure to build Golang projects. It also can automatically download needed Golang SDK from the main server and tune needed version of packets for their branch, tag or revisions.\nBecause a Golang project in the case is formed as just maven project, it is possible to work with it in any Java IDE which supports Maven.\n![mvn-golang-wrapper](https://raw.githubusercontent.com/raydac/mvn-golang/master/assets/doc_common.png)\n\n# How it works\nOn start the plug-in makes below steps:\n- analyzing the current platform to generate needed distributive name (it can be defined directly through properties)\n- check that needed Golang SDK is already cached, if it is not cached then needed SDK will be loaded and unpacked from the main Golang SDK site\n- execute needed go lang tool `bin/go` with defined command, the source folder will be set as current folder\n- all folders of the project which are visible for maven (source folder, test folder, resource folders and test resource folders) are archived in ZIP file and the file is saved as a maven artifact into local maven repository (or remote maven repository). The generated ZIP artifact also contains information about dependencies which can be recognized by the plugin. In opposite to Java, Golang produces platform-dependent artifacts so that it doesn't make sense to share them through maven central but only resources and sources.  \n\n# How to build\nBecause it is maven plugin, to build the plugin just use\n```\nmvn clean install -Pplugin\n```\nTo save time, examples excluded from the main build process and activated through special profile\n```\nmvn clean install -Pexamples\n```\n# Important note about automatic Golang SDK load\nIf you have some problems with certificates during Golang SDK load, then just add `<disableSSLcheck>true</disableSSLcheck>` into plugin configuration to ignore check of certificates (also you can use property 'mvn.golang.disable.ssl.check'). Also it allows property `mvn.golang.disable.ssl.check` to disable SSL certificate check during network actions.\n\n# How to add the plugin into maven project?\nBelow described build section for simple golang project which keeps source in `src` forlder and result should be placed into `bin` folder. Because it is golang project and mvn-golang plugin provides its own lifecycle, packaging for the project should be `<packaging>mvn-golang</packaging>`\n\n```xml\n<build>\n    <!--Changing standard Maven project source structure to make it Go compatible-->\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>2.3.10</version>\n        <extensions>true</extensions>\n        <executions>\n          <execution>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n</build>\n```\n# Work with dependencies\n\n## Dependencies from Maven repository (since 2.3.0)\n\nPlugin supports work with maven repository and can install and load dependencies from there. Artifacts generated by the plugin saved in maven respository as zip archives and `mvn-golang` must be used as `type`.\n```xml\n<dependency>\n  <groupId>com.igormaznitsa</groupId>\n  <artifactId>mvn-go-test-lib</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <type>mvn-golang</type>\n</dependency>\n\n```\nPlugin makes some trick in work with Maven Golang dependencies, it downloads Golang artifacts from repository and unpack them into temporary folder, then all unpacked dependencies are added to `$GOPATH`. You can take a look at [example project which has two level dependency hierarchy](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-maven-repository).\nDependency mechanism is enabled by default for all goals which need it, but it can be off with `<scanDependencies>false</scanDependencies>`. If there is any conflicts or errors in Golang for Go modules then you can turn off Go modules with\n```xml\n<env>\n  <GO111MODULE>off</GO111MODULE>\n</env>\n```\n__Keep in mind that it is impossible use links to Github and Bitbucket libraries through `<dependencies>` maven mechanism, links to such dependencies should be processed by standard `GET` command and information about it you can find below.__\n\n## Support of Module mode\n\nSince 2.3.3 version, plug-in supports Golang module mode and allows to mix modules and work with golang maven dependencies, [I have made some sample to show the possibility](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-maven-module-mix). By default support of module mode is turned off, but it can be turned on through `<moduleMode>true</moduleMode>` or property `mvn.golang.module.mode`.\n\n## Wrapped GET command\n\nPlugin provides wrapper for Golang GET command and you can just define some external file contains package info through\nsystem property `mvn.golang.get.packages.file`, the file will be loaded and parsed and its definitions will be added\ninto package dependencies. Format of the file is very easy. Each package described on a line in\nformat `package: <PACKAGE_NAME>[,branch: <BRANCH>][,tag: <TAG>][,revision: <REVISION>]` also it supports single line\ncomments through `//` and directive `#include <FILE_NAME>` to load packages from some external file. Also it supports\ninterpolation of properties defined in format `${property.name}` and provide access to maven, system and environment\nvariables.   \nExample:\n\n```\n// example package file\n#include \"${basedir}/external/file.txt\"\npackage:github.com/maruel/panicparse,tag:v1.0.2 // added because latest changes in panicparse is incompatible with termui\npackage:github.com/gizak/termui,branch:v2\n```\n\nThis mechanism just makes work with dependencies easier and if you want to provide some specific flags and scripts to\nprocess CVS folders you have to define configuration parameters in pom.xml, packages defined in the external file and in\nthe pom.xml will be mixed.\n\nThe Plug-in doesn't work with standard maven dependencies and they must be defined through task of the plugin, the\nexample of easiest case of dependencies is\n```xml\n<execution>\n   <id>default-get</id>\n   <configuration>\n     <packages>\n       <package>github.com/gizak/termui</package>\n       <package>github.com/kataras/iris</package>\n     </packages>\n   </configuration>\n</execution>\n```\nit will be executed as `bin/go get github.com/gizak/termui github.com/kataras/iris`\n\nIf you want work with specific branch then use below snipet\n```xml\n<execution>\n  <id>default-get</id>\n  <configuration>\n    <buildFlags>\n    <flag>-u</flag>\n    </buildFlags>\n    <packages>\n      <package>github.com/gizak/termui</package>\n    </packages>\n    <branch>v2</branch>\n  </configuration>\n</execution>\n```\nif you want to have several dependencies with different tag and branch then take a look at the snipet below\n```xml\n<execution>\n  <id>dependency1</id>\n  <goals>\n    <goal>get</goal>\n  </goals>\n  <configuration>\n    <packages>\n      <package>github.com/some/framework</package>\n    </packages>\n    <tag>1.0.1</tag>\n  </configuration>\n</execution>\n<execution>\n  <id>dependency2</id>\n  <goals>\n    <goal>get</goal>\n  </goals>\n  <configuration>\n    <packages>\n      <package>github.com/some/another</package>\n    </packages>\n    <branch>v2</branch>\n  </configuration>\n</execution>\n```\nsometime GIT can produce cache errors and in the case you can try to turn on auto-fix of such errors with `<autofixGitCache>true</autofixGitCache>` flag.   \n\n# How to save generated artifact in repository?\nBy default, artifact will be installed into maven repository automatically during `install` phase if you want to turn off artifact installation then you can use standard maven properties\n```xml\n<properties>\n    <maven.install.skip>true</maven.install.skip>\n    <maven.deploy.skip>true</maven.deploy.skip>\n</properties>\n```\nor disable plugin mojo execution\n```xml\n<execution>\n  <id>default-mvninstall</id>\n  <phase>none</phase>\n</execution>\n```\n\n# Configuration\n\nAbout configuration parameters, you can read at [the wiki page](https://github.com/raydac/mvn-golang/wiki/PluginConfigParameters).\n\n# Testing\nThe Wrapper just wraps calls to Go tool and recognize the exit code, if call of `go test` is non-zero then build will be failed, it doesn't make any analysing of test reports!   \nSometime it is useful to use [GoConvey](https://github.com/smartystreets/goconvey) tool for testing, in the case use snippet below to add dependency and make testing verbose\n```xml\n<execution>\n  <id>default-get</id>\n  <configuration>\n    <buildFlags>\n      <flag>-u</flag>\n    </buildFlags>\n    <packages>\n      <package>github.com/smartystreets/goconvey</package>\n    </packages>\n  </configuration>\n</execution>\n<execution>\n  <id>default-test</id>\n  <configuration>\n    <buildFlags>\n      <flag>-v</flag>\n    </buildFlags>\n  </configuration>\n</execution>                    \n```\n\n# Some Examples\n- __[Protobuf use example](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-protobuf)__\n- __[Maven repository dependencies example](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-maven-repository)__\n - __[Maven repository dependencies together with modules example](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-maven-module-mix)__\n - __[Versioning of dependencies](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/test-git-cvs)__\n - __[\"Hello world!\" console application.](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-helloworld)__\n - __[Console application with embedded text resource prepared with the `go-bindata` utility.](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-genbindata)__\n - __[Console application with `termui` library (it needs installation of some native libraries!).](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-termui)__\n - __[NES emulator.](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-nes)__\n - __[ANTLR usage.](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-antlr)__\n - __[Multimodule project.](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-multimodule)__\n - __[Preprocessing.](https://github.com/raydac/mvn-golang/tree/master/mvn-golang-examples/mvn-golang-example-preprocessing)__\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-azul3d-mandelbrot/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-azul3d-mandelbrot</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>Azul3d mandelbrot example</name>\n  <description>Example of Azul3d mandelbrot project build.</description>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>3.2.0</version>\n        <executions>\n          <execution>\n            <id>copy-resources</id>\n            <phase>package</phase>\n            <goals>\n              <goal>copy-resources</goal>\n            </goals>\n            <configuration>\n              <outputDirectory>${project.build.directory}</outputDirectory>\n              <resources>\n                <resource>\n                  <directory>${project.basedir}${file.separator}resources</directory>\n                </resource>\n              </resources>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <moduleMode>true</moduleMode>\n          <mod>mod</mod>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-fix</id>\n            <phase>none</phase>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-azul3d-mandelbrot/resources/azul3d_mandel/mandel.frag",
    "content": "#version 120\n\nvarying vec2 tc0;\n\nuniform sampler2D Texture0;\n\nvoid main()\n{\n\tgl_FragColor = texture2D(Texture0, tc0);\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-azul3d-mandelbrot/resources/azul3d_mandel/mandel.vert",
    "content": "#version 120\n\nattribute vec3 Vertex;\nattribute vec2 TexCoord0;\n\nvarying vec2 tc0;\n\nvoid main()\n{\n\ttc0 = TexCoord0;\n\tgl_Position = vec4(Vertex, 1.0);\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-azul3d-mandelbrot/src/azul3d_mandel.go",
    "content": "// Copyright 2014 The Azul3D Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Example - Generates a mandelbrot on the CPU and displays it with the GPU.\npackage main\n\nimport (\n\t\"image\"\n\t\"image/color\"\n\t\"image/png\"\n\t\"log\"\n\t\"math\"\n\t\"os\"\n\n\t\"azul3d.org/engine/gfx\"\n\t\"azul3d.org/engine/gfx/gfxutil\"\n\t\"azul3d.org/engine/gfx/window\"\n\t\"azul3d.org/engine/keyboard\"\n\t\"azul3d.org/engine/mouse\"\n\n\t\"azul3d.org/examples/abs\"\n)\n\n// mandelGen is a mandelbrot texture generator.\ntype mandelGen struct {\n\t// The channel of generated mandelbrot images. Only the last one received\n\t// over this channel is valid.\n\tImage chan image.Image\n\n\tx, y       float64         // Center, e.g. x=-0.5, y=0.\n\tzoom       float64         // Zoom, e.g. 1.0.\n\tresolution int             // Resolution divisor, e.g. 8.\n\tmaxIter    int             // Maximum number of generator iterations, e.g. 1000.\n\tneedUpdate bool            // Whether or not we should generate an updated image.\n\tbounds     image.Rectangle // The framebuffer's bounding rectangle.\n}\n\n// handle is called to handle a window event.\nfunc (m *mandelGen) handle(e window.Event) {\n\tswitch ev := e.(type) {\n\tcase window.FramebufferResized:\n\t\tm.bounds = image.Rect(0, 0, ev.Width, ev.Height)\n\n\tcase mouse.ButtonEvent:\n\t\tif ev.Button == mouse.Right && ev.State == mouse.Down {\n\t\t\tm.resolution += 2\n\t\t\tif m.resolution > 8 {\n\t\t\t\tm.resolution = 4\n\t\t\t}\n\t\t\tm.needUpdate = true\n\t\t}\n\n\tcase mouse.Scrolled:\n\t\tm.zoom += ev.Y * 0.06 * math.Abs(m.zoom)\n\t\tm.needUpdate = true\n\n\tcase window.CursorMoved:\n\t\tif ev.Delta {\n\t\t\tm.x += (ev.X / 900.0) / math.Abs(m.zoom)\n\t\t\tm.y += (ev.Y / 900.0) / math.Abs(m.zoom)\n\t\t\tm.needUpdate = true\n\t\t}\n\t}\n}\n\n// generate is a small helper function to call Mandelbrot and insert a small\n// red square into the image. It then submits the image over the channel.\nfunc (m *mandelGen) generate() {\n\twidth := m.bounds.Dx() / m.resolution\n\theight := m.bounds.Dy() / m.resolution\n\tmbrot := Mandelbrot(width, height, m.maxIter, m.zoom, m.x, m.y)\n\n\t// Insert a small red square in the top-left of the image for ensuring\n\t// proper orientation exists in textures (this is just for testing).\n\tfor x := 0; x < 5; x++ {\n\t\tfor y := 0; y < 5; y++ {\n\t\t\tmbrot.Set(x, y, color.RGBA{255, 0, 0, 255})\n\t\t}\n\t}\n\tm.Image <- mbrot\n}\n\n// run is the mandelbrot generation goroutine. It listens for window events and\n// responds by generating new mandelbrot images if needed.\nfunc (m *mandelGen) run(w window.Window) {\n\t// generate the initial mandelbrot image right now.\n\tm.generate()\n\n\t// Have the window notify us of specific events.\n\tevMask := window.MouseEvents\n\tevMask |= window.MouseScrolledEvents\n\tevMask |= window.FramebufferResizedEvents\n\tevMask |= window.CursorMovedEvents\n\tevent := make(chan window.Event, 256)\n\tw.Notify(event, evMask)\n\n\t// Wait for window events.\n\tfor {\n\t\t// Wait for one window event now.\n\t\tm.handle(<-event)\n\n\t\t// Handle as many window events as possible now. We do this because\n\t\t// generating mandelbrot images on the CPU is expensive, so we only\n\t\t// want to do it for the very last event.\n\t\twindow.Poll(event, m.handle)\n\n\t\t// If we need to update, generate the next mandelbrot image.\n\t\tif m.needUpdate {\n\t\t\tm.needUpdate = false\n\t\t\tm.generate()\n\t\t}\n\t}\n}\n\n// newMandelGen returns a new mandelbrot generator.\nfunc newMandelGen(w window.Window, d gfx.Device) *mandelGen {\n\tm := &mandelGen{\n\t\tImage:      make(chan image.Image),\n\t\tx:          -.5,\n\t\ty:          0,\n\t\tzoom:       1,\n\t\tresolution: 8,\n\t\tmaxIter:    1000,\n\t\tbounds:     d.Bounds(),\n\t}\n\n\t// Spawn the mandelbrot generation goroutine.\n\tgo m.run(w)\n\treturn m\n}\n\n// gfxLoop is responsible for drawing things to the window.\nfunc gfxLoop(w window.Window, d gfx.Device) {\n\t// Create a new mandelbrot generator.\n\tgen := newMandelGen(w, d)\n\n\t// Read the GLSL shaders from disk.\n\tshader, err := gfxutil.OpenShader(abs.Path(\"azul3d_mandel/mandel\"))\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Create a card mesh.\n\tcardMesh := gfx.NewMesh()\n\tcardMesh.Vertices = []gfx.Vec3{\n\t\t// Left triangle.\n\t\t{-1, 1, 0},  // Left-Top\n\t\t{-1, -1, 0}, // Left-Bottom\n\t\t{1, -1, 0},  // Right-Bottom\n\n\t\t// Right triangle.\n\t\t{-1, 1, 0}, // Left-Top\n\t\t{1, -1, 0}, // Right-Bottom\n\t\t{1, 1, 0},  // Right-Top\n\t}\n\tcardMesh.TexCoords = []gfx.TexCoordSet{\n\t\t{\n\t\t\tSlice: []gfx.TexCoord{\n\t\t\t\t// Left triangle.\n\t\t\t\t{0, 0},\n\t\t\t\t{0, 1},\n\t\t\t\t{1, 1},\n\n\t\t\t\t// Right triangle.\n\t\t\t\t{0, 0},\n\t\t\t\t{1, 1},\n\t\t\t\t{1, 0},\n\t\t\t},\n\t\t},\n\t}\n\n\t// Create the texture that will display the image. We could use DXT texture\n\t// compression normally here, but because we want to download the texture\n\t// back to the CPU we must not.\n\ttex := gfx.NewTexture()\n\ttex.MinFilter = gfx.Nearest\n\ttex.MagFilter = gfx.Nearest\n\ttex.KeepDataOnLoad = true\n\ttex.Source = <-gen.Image // Wait for the first image to be generated.\n\n\t// Create a card object.\n\tcard := gfx.NewObject()\n\tcard.State = gfx.NewState()\n\tcard.Shader = shader\n\tcard.Textures = []*gfx.Texture{tex}\n\tcard.Meshes = []*gfx.Mesh{cardMesh}\n\n\t// Get notified of mouse events and keyboard typing events.\n\tevents := make(chan window.Event, 1)\n\tw.Notify(events, window.MouseEvents|window.KeyboardTypedEvents)\n\n\tfor {\n\t\t// Handle each pending event.\n\t\twindow.Poll(events, func(e window.Event) {\n\t\t\tswitch ev := e.(type) {\n\t\t\tcase mouse.ButtonEvent:\n\t\t\t\t// Toggle mouse grab when the user left clicks.\n\t\t\t\tif ev.Button == mouse.Left && ev.State == mouse.Down {\n\t\t\t\t\tprops := w.Props()\n\t\t\t\t\tprops.SetCursorGrabbed(!props.CursorGrabbed())\n\t\t\t\t\tw.Request(props)\n\t\t\t\t}\n\n\t\t\tcase keyboard.Typed:\n\t\t\t\tif ev.S == \"s\" || ev.S == \"S\" {\n\t\t\t\t\tlog.Println(\"Writing texture to file...\")\n\n\t\t\t\t\t// Download the texture image from the graphics hardware\n\t\t\t\t\t// and save it to disk.\n\t\t\t\t\tcomplete := make(chan image.Image, 1)\n\n\t\t\t\t\t// Begin the texture download.\n\t\t\t\t\tcard.Textures[0].Download(card.Textures[0].Bounds, complete)\n\n\t\t\t\t\t// The download can occur in any goroutine!\n\t\t\t\t\tgo func() {\n\t\t\t\t\t\timg := <-complete // Wait for download to complete.\n\t\t\t\t\t\tif img == nil {\n\t\t\t\t\t\t\tlog.Println(\"Failed to download texture.\")\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Save to png.\n\t\t\t\t\t\t\tf, err := os.Create(\"mandel.png\")\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\tlog.Fatal(err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\terr = png.Encode(f, img)\n\t\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\t\tlog.Fatal(err)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlog.Println(\"Wrote texture to mandel.png\")\n\t\t\t\t\t\t}\n\t\t\t\t\t}()\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\t// If the mandelbrot generator has a new image for us, update the\n\t\t// texture.\n\t\tselect {\n\t\tcase img := <-gen.Image:\n\t\t\tcard.Textures[0].Loaded = false\n\t\t\tcard.Textures[0].Source = img\n\t\t\tcard.Textures[0].Bounds = img.Bounds()\n\t\tdefault:\n\t\t\tbreak\n\t\t}\n\n\t\t// Clear color and depth buffers.\n\t\td.Clear(d.Bounds(), gfx.Color{1, 1, 1, 1})\n\t\td.ClearDepth(d.Bounds(), 1.0)\n\n\t\t// Draw the card to the screen.\n\t\td.Draw(d.Bounds(), card, nil)\n\n\t\t// Render the whole frame.\n\t\td.Render()\n\t}\n}\n\nfunc main() {\n\twindow.Run(gfxLoop, nil)\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-azul3d-mandelbrot/src/go.mod",
    "content": "module github.com/mycodesmells/golang-examples/modules\n\n        go 1.16\n\n        require github.com/azul3d/engine v0.0.0-20180624221640-25c8eab2d474\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-azul3d-mandelbrot/src/go.sum",
    "content": "azul3d.org/engine v0.0.0-20180624221640-25c8eab2d474 h1:HrLWoqa15YkXa5jtwSRy7mEmmO9ZOPEFe0uMNmH+iyI=\nazul3d.org/engine v0.0.0-20180624221640-25c8eab2d474/go.mod h1:3y1cwzJTKvXXop+EAg+AUVfNm3bfHf3djeX+l1UBuUE=\nazul3d.org/engine v0.0.0-20211024043305-793ea6c2839d h1:oLr8Nu7iEKm8OKfHNznBnBj8Z/SKBa20yl7JKqJn4W8=\nazul3d.org/engine v0.0.0-20211024043305-793ea6c2839d/go.mod h1:3y1cwzJTKvXXop+EAg+AUVfNm3bfHf3djeX+l1UBuUE=\nazul3d.org/examples v0.0.0-20170219024453-39fa3be83226 h1:xgmG3cM8LmSAfPiQhvOZp5JNqOgPr+Kb6wF5o1H5RHQ=\nazul3d.org/examples v0.0.0-20170219024453-39fa3be83226/go.mod h1:ggGp3QbtOy/bIBpAnqnmPMF3tl+rnGb3BlFA663bdnI=\ngithub.com/azul3d/engine v0.0.0-20180624221640-25c8eab2d474/go.mod h1:XJaK+eQA5QZRq/Y8jYtJnUGhqAfHxG3z2PgwiHvE2BA=\ngithub.com/go-gl/glfw v0.0.0-20210311203641-62640a716d48 h1:2Ql7UigDMdlF+Ii12kdox7RKw3J1+uGhXn9FyYbbd20=\ngithub.com/go-gl/glfw v0.0.0-20210311203641-62640a716d48/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw v0.0.0-20210410170116-ea3d685f79fb h1:yMlfD+jmoG8wwBVLaFwtcgNBY207iWsYwtNC9u+T2yk=\ngithub.com/go-gl/glfw v0.0.0-20210410170116-ea3d685f79fb/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw v0.0.0-20210715014612-ab6297867137 h1:2aB3ABFHtLwpLF3EIMAzv757PfpJ0o8auPE4WW9u5Cc=\ngithub.com/go-gl/glfw v0.0.0-20210715014612-ab6297867137/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw v0.0.0-20211024062804-40e447a793be h1:oYR4JFQpVEKyqRCJB8wsdDLUJ2i+MrEFSGiKQyueTtY=\ngithub.com/go-gl/glfw v0.0.0-20211024062804-40e447a793be/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw v0.0.0-20211204153444-caad923f49f4 h1:X5mrMrb9hBwzHfg17GAbXv5nMMr9o5mxPWAndv3DPZI=\ngithub.com/go-gl/glfw v0.0.0-20211204153444-caad923f49f4/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw v0.0.0-20211213063430-748e38ca8aec h1:um18JldLG6QwC9tj6mSfQnb+kor5aezfPPtq1GmHek0=\ngithub.com/go-gl/glfw v0.0.0-20211213063430-748e38ca8aec/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw v0.0.0-20220712193148-63cf1f4ef61f h1:z8fT51Xm9eZTbm7yNueifTyKssA6f4vQIhxvXlGG0ds=\ngithub.com/go-gl/glfw v0.0.0-20220712193148-63cf1f4ef61f/go.mod h1:wyvWpaEu9B/VQiV1jsPs7Mha9I7yto/HqIBw197ZAzk=\ngithub.com/go-gl/glfw v0.0.0-20221017161538-93cebf72946b h1:2hdUMUOJuLQkhaPAwoyOeSzoaBydYEkXkBEuqDuDBfg=\ngithub.com/go-gl/glfw v0.0.0-20221017161538-93cebf72946b/go.mod h1:wyvWpaEu9B/VQiV1jsPs7Mha9I7yto/HqIBw197ZAzk=\ngithub.com/go-gl/glfw v0.0.0-20240118000515-a250818d05e3 h1:NwSSG7RUXNhytGezuEEAwP64ffNjUxgKz/xEq2YJCFA=\ngithub.com/go-gl/glfw v0.0.0-20240118000515-a250818d05e3/go.mod h1:wyvWpaEu9B/VQiV1jsPs7Mha9I7yto/HqIBw197ZAzk=\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-azul3d-mandelbrot/src/mandelbrot.go",
    "content": "// Copyright 2014 The Azul3D Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage main\n\nimport (\n\t\"image\"\n\t\"image/color\"\n\t\"math\"\n)\n\n// Calculates and returns a mandelbrot image.\nfunc Mandelbrot(w, h, maxIterations int, zoom, posX, posY float64) *image.RGBA {\n\tvar (\n\t\timg                        = image.NewRGBA(image.Rect(0, 0, w, h))\n\t\tpr, pi                     float64\n\t\tnewRe, newIm, oldRe, oldIm float64\n\t\tfw, fh                     = float64(w), float64(h)\n\t)\n\n\tfor y := 0; y < h; y++ {\n\t\tfor x := 0; x < w; x++ {\n\t\t\tfx := float64(x)\n\t\t\tfy := float64(y)\n\t\t\tpr = 1.5*(fx-fw/2)/(0.5*zoom*fw) + posX\n\t\t\tpi = (fy-fh/2)/(0.5*zoom*fh) + posY\n\t\t\tnewRe = 0\n\t\t\tnewIm = 0\n\t\t\toldRe = 0\n\t\t\toldIm = 0\n\t\t\tvar i int\n\t\t\tfor i = 0; i < maxIterations; i++ {\n\t\t\t\toldRe = newRe\n\t\t\t\toldIm = newIm\n\t\t\t\tnewRe = oldRe*oldRe - oldIm*oldIm + pr\n\t\t\t\tnewIm = 2*oldRe*oldIm + pi\n\t\t\t\tif (newRe*newRe + newIm*newIm) > 4 {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif i == maxIterations {\n\t\t\t\timg.Set(x, y, color.Black)\n\t\t\t} else {\n\t\t\t\tz := math.Sqrt(newRe*newRe + newIm*newIm)\n\t\t\t\tbrightness := uint8(256.0 * math.Log2(1.75+float64(i)-math.Log2(math.Log2(z))) / math.Log2(float64(maxIterations)))\n\t\t\t\timg.Set(x, y, color.RGBA{brightness, brightness, 255, 255})\n\t\t\t}\n\t\t}\n\t}\n\treturn img\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-clui/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  \n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-clui</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>CLUI example</name>\n  <description>Example of usage CLUI library for GUI (https://github.com/VladimirMarkelov/clui).</description>\n  \n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <resources>\n      <resource>\n        <directory>${basedir}${file.separator}res</directory>\n      </resource>\n    </resources>\n    <plugins>\n      <plugin>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>3.0.2</version>\n        <executions>\n          <execution>\n            <id>copy-resources</id>\n            <phase>validate</phase>\n            <goals>\n              <goal>copy-resources</goal>\n            </goals>\n            <configuration>\n              <outputDirectory>${project.build.directory}</outputDirectory>\n              <resources>\n                <resource>\n                  <directory>${basedir}${file.separator}res</directory>\n                  <filtering>false</filtering>\n                </resource>\n              </resources>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>get-dependencies</id>\n            <goals>\n              <goal>get</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>github.com/VladimirMarkelov/clui</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-clui/res/themes/acsii.theme",
    "content": "﻿//----------------- Theme properties -----------------\ntitle=ASCII\nauthor=Vladimir Markelov\nversion=1.0 (2015-11-02)\nparent=default\n\n\n//----------------- Colors -----------------\n// all are defaults\nProgressBack       = black bold\nProgressText       = white\nProgressActiveBack = black bold\nProgressActiveText = white\n\n//----------------- Objects -----------------\nSingleBorder=-|++++\nDoubleBorder==|++++\nEdit=<>V\nScrollBar=|O^V<>\nViewButtons=^_X[]\nCheckBox=[] X?\nRadio=() *\nProgressBar='| '\n\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-clui/res/themes/turbovision.theme",
    "content": "﻿//----------------- Theme properties -----------------\ntitle=TurboVision\nauthor=Vladimir Markelov\nversion=1.0 (2016-01-04)\nparent=default\n\n\n//----------------- Colors -----------------\n\n// View colors - internal area and border\nViewBack = white\nViewText = white bold\n\n// general colors\nBack         = white\nText         = black\nDisabledText = white\nDisabledBack = black bold\n\n// editable & listbox-like controls (interactive ones)\nEditBack       = blue\nEditText       = yellow\nEditActiveBack = blue bold\nEditActiveText = yellow bold\nSelectionText  = yellow bold\nSelectionBack  = cyan bold\n\n// scroll control\nScrollText = white bold\nScrollBack = white\nThumbText  = white bold\nThumbBack  = white\n\n// window-like controls (checkbox, radiogroup...)\nControlText         = black\nControlBack         = cyan bold\nControlActiveBack   = cyan bold\nControlActiveText   = yellow bold\nControlDisabledBack = cyan bold\nControlDisabledText = black bold\nControlShadow       = black\n\n// progressbar control\nProgressBack       = blue\nProgressText       = yellow\nProgressActiveBack = blue bold\nProgressActiveText = yellow bold\n\n// button control\nButtonBack=green bold\nButtonText=black\nButtonActiveBack=green bold\nButtonActiveText=white bold\nButtonShadowBack=black\nButtonDisabledText=black bold\nButtonDisabledBack=white\n\n// bar chart control\nBarChartBack=black\nBarChartText=white\n\n// spark chart\nSparkChartBack=black\nSparkChartText=white\nSparkChartBarBack=black\nSparkChartBarText=cyan\nSparkChartMaxBack=black\nSparkChartMaxText=cyan bold\n\n// table view\nTableText=white\nTableBack=black\nTableSelectedText=white\nTableSelectedBack=black bold\nTableActiveCellText=white bold\nTableActiveCellBack=black bold\nTableLineText=white\nTableHeaderText=white\nTableHeaderBack=black\n\n//----------------- Objects -----------------\nSingleBorder=─│┌┐└┘\nDoubleBorder=═║╔╗╚╝\nEdit=←→V\nScrollBar=░■▲▼◄►\nViewButtons=^↓○[]\nCheckBox=[] X?\nRadio=() *\nProgressBar=░▒\nBarChart=█─│┌┐└┘┬┴├┤┼\nSparkChart=█\nTableView=─│┼▼▲\n\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-clui/src/main.go",
    "content": "package main\n\nimport (\n\tui \"github.com/VladimirMarkelov/clui\"\n)\n\nfunc main() {\n\tui.InitLibrary()\n\tdefer ui.DeinitLibrary()\n\n\tview := ui.AddWindow(0, 0, 10, 7, \"Hello World!\")\n\tview.SetPack(ui.Vertical)\n\n\tfrmResize := ui.CreateFrame(view, 8, 6, ui.BorderNone, ui.Fixed)\n\tfrmResize.SetTitle(\"FrameTop\")\n\tfrmResize.SetPack(ui.Horizontal)\n\tbtn1 := ui.CreateButton(frmResize, 8, 5, \"Button 1\", 1)\n\tbtn2 := ui.CreateButton(frmResize, 8, 5, \"Button 2\", 1)\n\tbtn3 := ui.CreateButton(frmResize, 8, 5, \"Button 3\", 1)\n\n\tfrmBtns := ui.CreateFrame(view, 8, 5, ui.BorderNone, ui.Fixed)\n\tfrmBtns.SetPack(ui.Horizontal)\n\tfrmBtns.SetTitle(\"FrameBottom\")\n\n\tbtnHide1 := ui.CreateButton(frmBtns, 8, 4, \"Hide 1\", 1)\n\tbtnHide1.OnClick(func(ev ui.Event) {\n\t\tif btn1.Visible() {\n\t\t\tbtnHide1.SetTitle(\"Show 1\")\n\t\t\tui.ActivateControl(view, btn1)\n\t\t\tbtn1.SetVisible(false)\n\t\t} else {\n\t\t\tbtnHide1.SetTitle(\"Hide 1\")\n\t\t\tbtn1.SetVisible(true)\n\t\t}\n\t})\n\tbtnHide2 := ui.CreateButton(frmBtns, 8, 4, \"Hide 2\", 1)\n\tbtnHide2.OnClick(func(ev ui.Event) {\n\t\tif btn2.Visible() {\n\t\t\tbtnHide2.SetTitle(\"Show 2\")\n\t\t\tui.ActivateControl(view, btn2)\n\t\t\tbtn2.SetVisible(false)\n\t\t} else {\n\t\t\tbtnHide2.SetTitle(\"Hide 2\")\n\t\t\tbtn2.SetVisible(true)\n\t\t}\n\t})\n\tbtnHide3 := ui.CreateButton(frmBtns, 8, 4, \"Hide 3\", 1)\n\tbtnHide3.OnClick(func(ev ui.Event) {\n\t\tif btn3.Visible() {\n\t\t\tbtnHide3.SetTitle(\"Show 3\")\n\t\t\tui.ActivateControl(view, btn3)\n\t\t\tbtn3.SetVisible(false)\n\t\t} else {\n\t\t\tbtnHide3.SetTitle(\"Hide 3\")\n\t\t\tbtn3.SetVisible(true)\n\t\t}\n\t})\n\n\tbtnQuit := ui.CreateButton(frmBtns, 8, 4, \"Quit\", 1)\n\tbtnQuit.OnClick(func(ev ui.Event) {\n\t\tgo ui.Stop()\n\t})\n\n\tui.MainLoop()\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-fyne/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-fyne</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>TermUI example</name>\n  <description>It builds a sample from https://github.com/fyne-io/fyne</description>\n\n  <properties>\n    <mvn.golang.go.version>${go.sdk.version}</mvn.golang.go.version>\n  </properties>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <moduleMode>true</moduleMode>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-fyne/src/go.mod",
    "content": "module github.com/mycodesmells/golang-examples/fyne\n\ngo 1.20\n\nrequire fyne.io/fyne/v2 v2.5.1\n\nrequire (\n\tfyne.io/systray v1.11.0 // indirect\n\tgithub.com/BurntSushi/toml v1.4.0 // indirect\n\tgithub.com/davecgh/go-spew v1.1.1 // indirect\n\tgithub.com/fredbi/uri v1.1.0 // indirect\n\tgithub.com/fsnotify/fsnotify v1.7.0 // indirect\n\tgithub.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe // indirect\n\tgithub.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a // indirect\n\tgithub.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 // indirect\n\tgithub.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 // indirect\n\tgithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a // indirect\n\tgithub.com/go-text/render v0.1.1-0.20240418202334-dd62631dae9b // indirect\n\tgithub.com/go-text/typesetting v0.1.0 // indirect\n\tgithub.com/godbus/dbus/v5 v5.1.0 // indirect\n\tgithub.com/gopherjs/gopherjs v1.17.2 // indirect\n\tgithub.com/jeandeaual/go-locale v0.0.0-20240223122105-ce5225dcaa49 // indirect\n\tgithub.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e // indirect\n\tgithub.com/nicksnyder/go-i18n/v2 v2.4.0 // indirect\n\tgithub.com/pmezard/go-difflib v1.0.0 // indirect\n\tgithub.com/rymdport/portal v0.2.6 // indirect\n\tgithub.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c // indirect\n\tgithub.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef // indirect\n\tgithub.com/stretchr/testify v1.8.4 // indirect\n\tgithub.com/yuin/goldmark v1.7.1 // indirect\n\tgolang.org/x/image v0.18.0 // indirect\n\tgolang.org/x/mobile v0.0.0-20231127183840-76ac6878050a // indirect\n\tgolang.org/x/net v0.25.0 // indirect\n\tgolang.org/x/sys v0.20.0 // indirect\n\tgolang.org/x/text v0.16.0 // indirect\n\tgopkg.in/yaml.v3 v3.0.1 // indirect\n)\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-fyne/src/go.sum",
    "content": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=\ncloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=\ncloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=\ncloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=\ncloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=\ncloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=\ncloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=\ncloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=\ncloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=\ncloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=\ncloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=\ncloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=\ncloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=\ncloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=\ncloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=\ncloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=\ncloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=\ncloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=\ncloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=\ncloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=\ncloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=\ncloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=\ncloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=\ncloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=\ncloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=\ncloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=\ncloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=\ncloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=\ncloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=\ncloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=\ncloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=\ncloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=\ncloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=\ncloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=\ncloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=\ncloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=\ndmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=\nfyne.io/fyne/v2 v2.5.1 h1:jd2mhQz0ViosZjhgR5l2bdCbc5HFqkYnTzEXX8UOC7I=\nfyne.io/fyne/v2 v2.5.1/go.mod h1:NdxEG8L7EVWo06/cYbXW11uA0X7UG8Q8j5CLebvTZi8=\nfyne.io/systray v1.11.0 h1:D9HISlxSkx+jHSniMBR6fCFOUjk1x/OOOJLa9lJYAKg=\nfyne.io/systray v1.11.0/go.mod h1:RVwqP9nYMo7h5zViCBHri2FgjXF7H2cub7MAq4NSoLs=\ngithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=\ngithub.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=\ngithub.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=\ngithub.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=\ngithub.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=\ngithub.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=\ngithub.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=\ngithub.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=\ngithub.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=\ngithub.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=\ngithub.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=\ngithub.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=\ngithub.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=\ngithub.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=\ngithub.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=\ngithub.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=\ngithub.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=\ngithub.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/fredbi/uri v1.1.0 h1:OqLpTXtyRg9ABReqvDGdJPqZUxs8cyBDOMXBbskCaB8=\ngithub.com/fredbi/uri v1.1.0/go.mod h1:aYTUoAXBOq7BLfVJ8GnKmfcuURosB1xyHDIfWeC/iW4=\ngithub.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=\ngithub.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=\ngithub.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=\ngithub.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe h1:A/wiwvQ0CAjPkuJytaD+SsXkPU0asQ+guQEIg1BJGX4=\ngithub.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe/go.mod h1:d4clgH0/GrRwWjRzJJQXxT/h1TyuNSfF/X64zb/3Ggg=\ngithub.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a h1:ybgRdYvAHTn93HW79bLiBiJwVL4jVeyGQRZMgImoeWs=\ngithub.com/fyne-io/glfw-js v0.0.0-20240101223322-6e1efdc71b7a/go.mod h1:gsGA2dotD4v0SR6PmPCYvS9JuOeMwAtmfvDE7mbYXMY=\ngithub.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 h1:hnLq+55b7Zh7/2IRzWCpiTcAvjv/P8ERF+N7+xXbZhk=\ngithub.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2/go.mod h1:eO7W361vmlPOrykIg+Rsh1SZ3tQBaOsfzZhsIOb/Lm0=\ngithub.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=\ngithub.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 h1:zDw5v7qm4yH7N8C8uWd+8Ii9rROdgWxQuGoJ9WDXxfk=\ngithub.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6/go.mod h1:9YTyiznxEY1fVinfM7RvRcjRHbw2xLBJ3AAGIT0I4Nw=\ngithub.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a h1:vxnBhFDDT+xzxf1jTJKMKZw3H0swfWk9RpWbBbDK5+0=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-text/render v0.1.1-0.20240418202334-dd62631dae9b h1:daoFn+Aw8EIQZO9kYWwHL01FqwwpCl2nTeVEYbsgRHk=\ngithub.com/go-text/render v0.1.1-0.20240418202334-dd62631dae9b/go.mod h1:jqEuNMenrmj6QRnkdpeaP0oKGFLDNhDkVKwGjsWWYU4=\ngithub.com/go-text/typesetting v0.1.0 h1:vioSaLPYcHwPEPLT7gsjCGDCoYSbljxoHJzMnKwVvHw=\ngithub.com/go-text/typesetting v0.1.0/go.mod h1:d22AnmeKq/on0HNv73UFriMKc4Ez6EqZAofLhAzpSzI=\ngithub.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=\ngithub.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=\ngithub.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=\ngithub.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=\ngithub.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=\ngithub.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=\ngithub.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=\ngithub.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=\ngithub.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=\ngithub.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=\ngithub.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=\ngithub.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=\ngithub.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=\ngithub.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=\ngithub.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=\ngithub.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=\ngithub.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=\ngithub.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=\ngithub.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=\ngithub.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=\ngithub.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=\ngithub.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/gopherjs/gopherjs v0.0.0-20211219123610-ec9572f70e60/go.mod h1:cz9oNYuRUWGdHmLF2IodMLkAhcPtXeULvcBNagUrxTI=\ngithub.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=\ngithub.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=\ngithub.com/goxjs/gl v0.0.0-20210104184919-e3fafc6f8f2a/go.mod h1:dy/f2gjY09hwVfIyATps4G2ai7/hLwLkc5TrPqONuXY=\ngithub.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=\ngithub.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=\ngithub.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=\ngithub.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=\ngithub.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=\ngithub.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=\ngithub.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=\ngithub.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=\ngithub.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=\ngithub.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=\ngithub.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=\ngithub.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=\ngithub.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=\ngithub.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=\ngithub.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=\ngithub.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=\ngithub.com/jeandeaual/go-locale v0.0.0-20240223122105-ce5225dcaa49 h1:Po+wkNdMmN+Zj1tDsJQy7mJlPlwGNQd9JZoPjObagf8=\ngithub.com/jeandeaual/go-locale v0.0.0-20240223122105-ce5225dcaa49/go.mod h1:YiutDnxPRLk5DLUFj6Rw4pRBBURZY07GFr54NdV9mQg=\ngithub.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=\ngithub.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=\ngithub.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e h1:LvL4XsI70QxOGHed6yhQtAU34Kx3Qq2wwBzGFKY8zKk=\ngithub.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e/go.mod h1:kLgvv7o6UM+0QSf0QjAse3wReFDsb9qbZJdfexWlrQw=\ngithub.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=\ngithub.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=\ngithub.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=\ngithub.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=\ngithub.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=\ngithub.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=\ngithub.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=\ngithub.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=\ngithub.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=\ngithub.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=\ngithub.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=\ngithub.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=\ngithub.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=\ngithub.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=\ngithub.com/nicksnyder/go-i18n/v2 v2.4.0 h1:3IcvPOAvnCKwNm0TB0dLDTuawWEj+ax/RERNC+diLMM=\ngithub.com/nicksnyder/go-i18n/v2 v2.4.0/go.mod h1:nxYSZE9M0bf3Y70gPQjN9ha7XNHX7gMc814+6wVyEI4=\ngithub.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=\ngithub.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=\ngithub.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=\ngithub.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=\ngithub.com/rymdport/portal v0.2.6 h1:HWmU3gORu7vWcpr7VSwUS2Xx1HtJXVcUuTqEZcMEsIg=\ngithub.com/rymdport/portal v0.2.6/go.mod h1:kFF4jslnJ8pD5uCi17brj/ODlfIidOxlgUDTO5ncnC4=\ngithub.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=\ngithub.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=\ngithub.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=\ngithub.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=\ngithub.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw=\ngithub.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=\ngithub.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=\ngithub.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=\ngithub.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=\ngithub.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=\ngithub.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=\ngithub.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=\ngithub.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c h1:km8GpoQut05eY3GiYWEedbTT0qnSxrCjsVbb7yKY1KE=\ngithub.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c/go.mod h1:cNQ3dwVJtS5Hmnjxy6AgTPd0Inb3pW05ftPSX7NZO7Q=\ngithub.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef h1:Ch6Q+AZUxDBCVqdkI8FSpFyZDtCVBc2VmejdNrm5rRQ=\ngithub.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef/go.mod h1:nXTWP6+gD5+LUJ8krVhhoeHjvHTutPxMYl5SvkcnJNE=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=\ngithub.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=\ngithub.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=\ngithub.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=\ngithub.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=\ngithub.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=\ngithub.com/yuin/goldmark v1.7.1 h1:3bajkSilaCbjdKVsKdZjZCLBNPL9pYzrCakKaf4U49U=\ngithub.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=\ngo.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=\ngo.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=\ngo.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=\ngo.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=\ngo.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=\ngo.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=\ngo.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=\ngo.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=\ngo.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=\ngolang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=\ngolang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=\ngolang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=\ngolang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=\ngolang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=\ngolang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=\ngolang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=\ngolang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=\ngolang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=\ngolang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=\ngolang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=\ngolang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=\ngolang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=\ngolang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=\ngolang.org/x/mobile v0.0.0-20211207041440-4e6c2922fdee/go.mod h1:pe2sM7Uk+2Su1y7u/6Z8KJ24D7lepUjFZbhFOrmDfuQ=\ngolang.org/x/mobile v0.0.0-20231127183840-76ac6878050a h1:sYbmY3FwUWCBTodZL1S3JUuOvaW6kM2o+clDzzDNBWg=\ngolang.org/x/mobile v0.0.0-20231127183840-76ac6878050a/go.mod h1:Ede7gF0KGoHlj822RtphAHK1jLdrcuRBZg0sF1Q+SPc=\ngolang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=\ngolang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=\ngolang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=\ngolang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=\ngolang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=\ngolang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=\ngolang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=\ngolang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=\ngolang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=\ngolang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=\ngolang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=\ngolang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=\ngolang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=\ngolang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngoogle.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=\ngoogle.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=\ngoogle.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=\ngoogle.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=\ngoogle.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=\ngoogle.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=\ngoogle.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=\ngoogle.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=\ngoogle.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=\ngoogle.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=\ngoogle.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=\ngoogle.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=\ngoogle.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=\ngoogle.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=\ngoogle.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=\ngoogle.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=\ngoogle.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=\ngoogle.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=\ngoogle.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=\ngoogle.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=\ngoogle.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=\ngoogle.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=\ngoogle.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=\ngoogle.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=\ngoogle.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=\ngoogle.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=\ngoogle.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=\ngoogle.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=\ngoogle.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=\ngoogle.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=\ngoogle.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=\ngoogle.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=\ngoogle.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=\ngoogle.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=\ngoogle.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=\ngoogle.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=\ngoogle.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=\ngoogle.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=\ngopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\nhonnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=\nhonnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nhonnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nrsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=\nrsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=\nrsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-fyne/src/hello.go",
    "content": "package main\n\nimport (\n\t\"fyne.io/fyne/v2/app\"\n\t\"fyne.io/fyne/v2/container\"\n\t\"fyne.io/fyne/v2/widget\"\n)\n\nfunc main() {\n\ta := app.New()\n\tw := a.NewWindow(\"Hello\")\n\n\thello := widget.NewLabel(\"Hello Fyne!\")\n\tw.SetContent(container.NewVBox(\n\t\thello,\n\t\twidget.NewButton(\"Hi!\", func() {\n\t\t\thello.SetText(\"Welcome :)\")\n\t\t}),\n\t))\n\n\tw.ShowAndRun()\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-genbindata/data/la_espero.txt",
    "content": "En la mondon venis nova sento,\nTra la mondo iras forta voko;\nPer flugiloj de facila vento\nNun de loko flugu ĝi al loko.\n\nNe al glavo sangon soifanta\nĜi la homan tiras familion:\nAl la mond' eterne militanta\nĜi promesas sanktan harmonion.\n\nSub la sankta signo de l' espero\nKolektiĝas pacaj batalantoj,\nKaj rapide kreskas la afero\nPer laboro de la esperantoj.\n\nForte staras muroj de miljaroj\nInter la popoloj dividitaj;\nSed dissaltos la obstinaj baroj,\nPer la sankta amo disbatitaj.\n\nSur neŭtrala lingva fundamento,\nKomprenante unu la alian,\nLa popoloj faros en konsento\nUnu grandan rondon familian.\n\nNia diligenta kolegaro\nEn laboro paca ne laciĝos,\nĜis la bela sonĝo de l' homaro\nPor eterna ben' efektiviĝos.\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-genbindata/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  \n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-genbindata</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>Example of GEN + BinData</name>\n  <description>Example of GoBinData utility call from 'gen' command.</description>\n  \n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <resources>\n      <resource>\n        <directory>${basedir}${file.separator}data</directory>\n      </resource>\n    </resources>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <addToGoPath>\n            <folder>${basedir}${file.separator}bin</folder>\n          </addToGoPath>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-get</id>\n            <goals>\n              <goal>get</goal>\n            </goals>\n            <configuration>\n              <buildFlags>\n                <flag>-u</flag>\n              </buildFlags>\n              <autofixGitCache>true</autofixGitCache>\n              <packages>\n                <package>github.com/jteeuwen/go-bindata/...</package>\n              </packages>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-build</id>\n          </execution>\n          <execution>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-genbindata/src/main.go",
    "content": "package main\n\nimport (\n\t\"example/bindata\"\n\t\"fmt\"\n\t\"os\"\n)\n\n//go:generate go-bindata -prefix \"../data/\" -pkg bindata -o ../bin/src/example/bindata/binasset.go ../data/...\nfunc main() {\n\tdata, err := bindata.Asset(\"la_espero.txt\")\n\tif err != nil {\n\t\tfmt.Printf(\"Can't find needed asset\")\n\t\tos.Exit(1)\n\t}\n\tfmt.Printf(\"\\n    La Espero\\n==================\\n%v\", string(data))\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gocui/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n      <groupId>com.igormaznitsa</groupId>\n      <artifactId>mvn-golang-examples</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>mvn-golang-example-gocui</artifactId>\n    <packaging>mvn-golang</packaging>\n\n    <name>GOCUI example</name>\n    <description>Example of GOCUI https://github.com/jroimartin/gocui</description>\n\n    <build>\n      <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n      <directory>${basedir}${file.separator}bin</directory>\n      <plugins>\n        <plugin>\n          <groupId>com.igormaznitsa</groupId>\n          <artifactId>mvn-golang-wrapper</artifactId>\n          <version>${main-project-version}</version>\n          <extensions>true</extensions>\n          <configuration>\n            <goVersion>${go.sdk.version}</goVersion>\n            <env>\n              <GO111MODULE>auto</GO111MODULE>\n            </env>\n          </configuration>\n          <executions>\n            <execution>\n              <id>default-get</id>\n              <configuration>\n                <packages>\n                  <package>github.com/jroimartin/gocui</package>\n                </packages>\n              </configuration>\n            </execution>\n          </executions>\n        </plugin>\n      </plugins>\n    </build>\n    \n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gocui/src/gocui.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/jroimartin/gocui\"\n)\n\nfunc main() {\n\tg, err := gocui.NewGui(gocui.OutputNormal)\n\tif err != nil {\n\t\tlog.Panicln(err)\n\t}\n\tdefer g.Close()\n\n\tg.SetManagerFunc(layout)\n\n\tif err := g.SetKeybinding(\"\", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil {\n\t\tlog.Panicln(err)\n\t}\n\n\tif err := g.MainLoop(); err != nil && err != gocui.ErrQuit {\n\t\tlog.Panicln(err)\n\t}\n}\n\nfunc layout(g *gocui.Gui) error {\n\tmaxX, maxY := g.Size()\n\tif v, err := g.SetView(\"hello\", maxX/2-7, maxY/2, maxX/2+7, maxY/2+2); err != nil {\n\t\tif err != gocui.ErrUnknownView {\n\t\t\treturn err\n\t\t}\n\n\t\tfmt.Fprintln(v, \"\\x1b[0;31mHello world\")\n\t}\n\treturn nil\n}\n\nfunc quit(g *gocui.Gui, v *gocui.View) error {\n\treturn gocui.ErrQuit\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-goexample/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  \n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-goexample</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>GoExample</name>\n  <description>Example of minimalistic usage of mvn-golang-wrapper to build a 'Hello World' example.</description>\n  \n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n          <goVersion>${go.sdk.version}</goVersion>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-goexample/src/golang-book/chapter11/math/math.go",
    "content": "package math\n\nfunc Average(xs []float64) float64 {\n\ttotal := float64(0)\n\tfor _, x := range xs {\n\t\ttotal += x\n\t}\n\treturn total / float64(len(xs))\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-goexample/src/golang-book/chapter11/math/math_test.go",
    "content": "package math\n\nimport \"testing\"\n\nfunc TestAverage(t *testing.T) {\n\tvar v float64\n\tv = Average([]float64{1, 2})\n\tif v != 1.5 {\n\t\tt.Error(\"Expected 1.5, got \", v)\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-goexample/src/main.go",
    "content": "package main\n\nimport \"fmt\"\nimport \"golang-book/chapter11/math\"\n\nfunc main() {\n\txs := []float64{1, 2, 3, 4}\n\tavg := math.Average(xs)\n\tfmt.Println(avg)\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-goterm/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n      <groupId>com.igormaznitsa</groupId>\n      <artifactId>mvn-golang-examples</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>mvn-golang-example-goterm</artifactId>\n    <packaging>mvn-golang</packaging>\n\n    <name>GoTerm example</name>\n    <description>Example of GoTerm usage with GoLang https://github.com/buger/goterm</description>\n\n    <build>\n      <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n      <directory>${basedir}${file.separator}bin</directory>\n      <plugins>\n        <plugin>\n          <groupId>com.igormaznitsa</groupId>\n          <artifactId>mvn-golang-wrapper</artifactId>\n          <version>${main-project-version}</version>\n          <extensions>true</extensions>\n          <configuration>\n            <goVersion>${go.sdk.version}</goVersion>\n            <env>\n              <GO111MODULE>auto</GO111MODULE>\n            </env>\n          </configuration>\n          <executions>\n            <execution>\n              <id>default-get</id>\n              <configuration>\n                <buildFlags>\n                  <flag>-u</flag>\n                </buildFlags>\n                <autofixGitCache>true</autofixGitCache>\n                <packages>\n                  <package>github.com/buger/goterm</package>\n                </packages>\n              </configuration>\n            </execution>\n          </executions>\n        </plugin>\n      </plugins>\n    </build>\n    \n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-goterm/src/time.go",
    "content": "package main\n\nimport (\n\ttm \"github.com/buger/goterm\"\n\t\"math\"\n)\n\nfunc main() {\n\ttm.Clear()\n\ttm.MoveCursor(0, 0)\n\n\tchart := tm.NewLineChart(100, 20)\n\tdata := new(tm.DataTable)\n\tdata.AddColumn(\"Time\")\n\tdata.AddColumn(\"Sin(x)\")\n\tdata.AddColumn(\"Cos(x+1)\")\n\n\tfor i := 0.1; i < 10; i += 0.1 {\n\t\tdata.AddRow(i, math.Sin(i), math.Cos(i+1))\n\t}\n\n\ttm.Println(chart.Draw(data))\n\ttm.Flush()\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui/dependencies.txt",
    "content": "package:github.com/andlabs/ui,revision:867a9e5a498d85e2722730ed88c5f00560c7c354\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-gui</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>GUI example</name>\n  <description>Example of minimalistic GUI application.</description>\n\n  <properties>\n    <mvn.golang.get.packages.file>${basedir}${file.separator}dependencies.txt</mvn.golang.get.packages.file>\n  </properties>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <echoWarn>\n            <echo>LINUX: if build complains about GTK 3.0 then use sudo apt-get install libgtk-3-dev</echo>\n          </echoWarn>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui/src/main.go",
    "content": "package main\n\nimport (\n\t\"github.com/andlabs/ui\"\n)\n\nfunc main() {\n\terr := ui.Main(func() {\n\t\tname := ui.NewEntry()\n\t\tbutton := ui.NewButton(\"Greet\")\n\t\tgreeting := ui.NewLabel(\"\")\n\t\tbox := ui.NewVerticalBox()\n\t\tbox.Append(ui.NewLabel(\"Enter your name:\"), false)\n\t\tbox.Append(name, false)\n\t\tbox.Append(button, false)\n\t\tbox.Append(greeting, false)\n\t\twindow := ui.NewWindow(\"Hello\", 200, 100, false)\n\t\twindow.SetChild(box)\n\t\tbutton.OnClicked(func(*ui.Button) {\n\t\t\tgreeting.SetText(\"Hello, \" + name.Text() + \"!\")\n\t\t})\n\t\twindow.OnClosing(func(*ui.Window) bool {\n\t\t\tui.Quit()\n\t\t\treturn true\n\t\t})\n\t\twindow.Show()\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/backend/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>com.igormaznitsa.go-gwt</groupId>\n        <artifactId>mvn-golang-example-gui-gwt</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>backend</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n    <packaging>mvn-golang</packaging>\n    \n    <description>Backend part of the GoLang+GWT example, it implements the server side.</description>\n\n    <properties>\n        <final.extension></final.extension>\n    </properties>\n            \n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>frontend</artifactId>\n            <version>${project.version}</version>\n            <scope>provided</scope>\n        </dependency>\n    </dependencies>\n\n    <profiles>\n        <profile>\n            <id>under-windows</id>\n            <activation>\n                <os>\n                    <family>windows</family>\n                </os>\n            </activation>\n            <properties>\n                <final.extension>.exe</final.extension>\n            </properties>\n        </profile>\n    </profiles>\n\n    <build>\n        <finalName>${project.artifactId}-${project.version}${final.extension}</finalName>\n        <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n        <directory>${basedir}${file.separator}bin</directory>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <version>${main-project-version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                  <goVersion>${go.sdk.version}</goVersion>\n                  <env>\n                    <GO111MODULE>auto</GO111MODULE>\n                  </env>\n                  <addToGoPath>\n                    <folder>${basedir}${file.separator}bin</folder>\n                  </addToGoPath>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>default-get</id>\n                        <goals>\n                            <goal>get</goal>\n                        </goals>\n                        <configuration>\n                            <buildFlags>\n                                <flag>-u</flag>\n                            </buildFlags>\n                            <autofixGitCache>true</autofixGitCache>\n                            <packages>\n                                <package>github.com/jteeuwen/go-bindata/...</package>\n                                <package>github.com/skratchdot/open-golang/open</package>\n                            </packages>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/backend/src/main.go",
    "content": "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"front/bindata\"\n\t\"github.com/skratchdot/open-golang/open\"\n\t\"io\"\n\t\"log\"\n\t\"mime\"\n\t\"net\"\n\t\"net/http\"\n\t\"os\"\n\tpathop \"path\"\n\t\"strconv\"\n\t\"time\"\n)\n\n//go:generate go-bindata -prefix \"../../frontend/target/frontend.out\" -pkg bindata -o ../bin/src/front/bindata/binasset.go ../../frontend/target/frontend.out/...\n\nvar watchdog_chn = make(chan int)\n\ntype data_struct struct {\n\tData string\n}\n\ntype push_event struct {\n\tTime int64\n}\n\nfunc makeTimestamp() int64 {\n\treturn time.Now().UnixNano() / (int64(time.Millisecond) / int64(time.Nanosecond))\n}\n\nvar eventmap = map[string](func(data_struct) data_struct){\n\t\"buttons/send\": eventButtonSend,\n}\n\nfunc eventButtonSend(data data_struct) data_struct {\n\tdata.Data = data.Data + \"! Hello from the Go side!\"\n\treturn data\n}\n\nfunc push_handler(rw http.ResponseWriter, req *http.Request) {\n\twatchdog_chn <- 0\n\n\trw.Header().Set(\"Content-Type\", \"application/json\")\n\trw.Header().Set(\"Cache-Control\", \"no-cache\")\n\tvar data push_event\n\tdata.Time = makeTimestamp()\n\tjs, err := json.Marshal(data)\n\tif err != nil {\n\t\tlog.Panic(err)\n\t}\n\trw.Write(js)\n}\n\nfunc watchdog() {\n\tfor {\n\t\tselect {\n\t\tcase <-watchdog_chn:\n\t\tcase <-time.After(5 * time.Second):\n\t\t\tlog.Print(\"Looks like that UI part has been closed\")\n\t\t\tos.Exit(0)\n\t\t}\n\t}\n}\n\nfunc static_handler(rw http.ResponseWriter, req *http.Request) {\n\tif req.Method == http.MethodGet {\n\t\tvar path string = req.URL.Path\n\t\tif path == \"\" {\n\t\t\tpath = \"index.html\"\n\t\t}\n\n\t\tif path == \"__mailbox__\" {\n\t\t\tpush_handler(rw, req)\n\t\t} else {\n\t\t\tif bs, err := bindata.Asset(path); err != nil {\n\t\t\t\tlog.Printf(\"Can't find resource : %s\", path)\n\t\t\t\trw.WriteHeader(http.StatusNotFound)\n\t\t\t} else {\n\t\t\t\tmime := mime.TypeByExtension(pathop.Ext(path))\n\t\t\t\tvar reader = bytes.NewBuffer(bs)\n\t\t\t\tif mime == \"\" {\n\t\t\t\t\tmime = http.DetectContentType(bs)\n\t\t\t\t}\n\t\t\t\tlog.Printf(\"Resource '%s' mime=%s\", path, mime)\n\t\t\t\trw.Header().Set(\"Content-Type\", mime)\n\t\t\t\trw.Header().Set(\"Cache-Control\", \"no-cache\")\n\t\t\t\tio.Copy(rw, reader)\n\t\t\t}\n\t\t}\n\t} else if req.Method == http.MethodPost {\n\t\tpath := req.URL.Path\n\t\tlog.Printf(\"Incoming event : %s\", path)\n\n\t\teventfunc := eventmap[path]\n\n\t\tif eventfunc == nil {\n\t\t\tlog.Panic(\"Can't find event processor for \" + path)\n\t\t}\n\n\t\tdecoder := json.NewDecoder(req.Body)\n\n\t\tvar t data_struct\n\t\terr := decoder.Decode(&t)\n\n\t\tif err != nil {\n\t\t\thttp.Error(rw, err.Error(), http.StatusInternalServerError)\n\t\t\tlog.Print(err)\n\t\t} else {\n\t\t\tt = eventfunc(t)\n\t\t\tjs, error := json.Marshal(t)\n\t\t\tif error != nil {\n\t\t\t\thttp.Error(rw, error.Error(), http.StatusInternalServerError)\n\t\t\t} else {\n\t\t\t\trw.Header().Set(\"Content-Type\", \"application/json\")\n\t\t\t\trw.Header().Set(\"Cache-Control\", \"no-cache\")\n\t\t\t\trw.Write(js)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc findFreePort() (int, error) {\n\taddr, err := net.ResolveTCPAddr(\"tcp\", \"127.0.0.1:0\")\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tl, err := net.ListenTCP(\"tcp\", addr)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tdefer l.Close()\n\treturn l.Addr().(*net.TCPAddr).Port, nil\n}\n\nfunc main() {\n\tport, err := findFreePort()\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"Application server address 127.0.0.1:%d\", port)\n\n\thttp.Handle(\"/\", http.StripPrefix(\"/\", http.HandlerFunc(static_handler)))\n\tlistenStartBrowserAndServe(\"127.0.0.1:\" + strconv.Itoa(port))\n}\n\ntype tcpKeepAliveListener struct {\n\t*net.TCPListener\n}\n\nfunc listenStartBrowserAndServe(addr string) error {\n\tserver := &http.Server{Addr: addr, Handler: nil}\n\n\tln, err := net.Listen(\"tcp\", addr)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = open.Run(\"http://\" + addr + \"/index.html\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tgo watchdog()\n\n\treturn server.Serve(tcpKeepAliveListener{ln.(*net.TCPListener)})\n\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/frontend/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project\n    xmlns=\"http://maven.apache.org/POM/4.0.0\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>com.igormaznitsa.go-gwt</groupId>\n        <artifactId>mvn-golang-example-gui-gwt</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>frontend</artifactId>\n    <packaging>jar</packaging>\n\n    <description>Frontend part of the GoLang+GWT example, it implements web based GUI.</description>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.gwtproject</groupId>\n            <artifactId>gwt-user</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.gwtproject</groupId>\n            <artifactId>gwt-dev</artifactId>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.13.2</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <finalName>frontend.out</finalName>\n        <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>3.7.0</version>\n                <configuration>\n                  <source>1.8</source>\n                  <target>1.8</target>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-war-plugin</artifactId>\n                <version>3.2.0</version>\n                <executions>\n                    <execution>\n                        <id>war-exploded</id>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>exploded</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-clean-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <!-- delete Java server oriented folders from the result one to prevent their include into Go program -->\n                        <id>delete-webinf-in-result</id>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>clean</goal>\n                        </goals>\n                        <configuration>\n                            <excludeDefaultDirectories>true</excludeDefaultDirectories>\n                            <filesets>\n                                <fileset>\n                                    <directory>${project.build.directory}/${project.build.finalName}/WEB-INF</directory>\n                                </fileset>\n                                <fileset>\n                                    <directory>${project.build.directory}/${project.build.finalName}/META-INF</directory>\n                                </fileset>\n                            </filesets>\n                        </configuration>\n                    </execution>\n                </executions>\n                <configuration>\n                    <excludeDefaultDirectories>false</excludeDefaultDirectories>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>gwt-maven-plugin</artifactId>\n                <version>2.8.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <style>DETAILED</style>\n                    <!--<style>OBFUSCATED</style>-->\n                    <runTarget>index.html</runTarget>\n                    <modules>\n                        <module>com.igormaznitsa.gwtfrontend</module>\n                    </modules>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/frontend/src/main/java/com/igormaznitsa/client/BackendService.java",
    "content": "/*\n * Copyright 2018 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.igormaznitsa.client;\n\nimport com.google.gwt.http.client.Request;\nimport com.google.gwt.http.client.RequestBuilder;\nimport com.google.gwt.http.client.RequestCallback;\nimport com.google.gwt.http.client.RequestException;\nimport com.google.gwt.http.client.Response;\nimport com.google.gwt.http.client.UrlBuilder;\nimport com.google.gwt.json.client.JSONObject;\nimport com.google.gwt.json.client.JSONParser;\nimport com.google.gwt.json.client.JSONString;\nimport com.google.gwt.user.client.Timer;\nimport com.google.gwt.user.client.Window;\n\npublic class BackendService {\n\n    public interface PushListener {\n\n        /**\n         * Notificaton for push event\n         * @param event event data as JSON object\n         * @return true if push event should continue processing, false if push event shold be stopped\n         */\n        boolean onPushEvent(JSONObject event);\n\n        /**\n         * Notification about error in push event mechanism\n         * @param thr error object\n         * @return true if push event mechanism should continue its work, false if it should be stopped\n         */\n        boolean onPushSystemError(Throwable thr);\n    }\n\n    public interface Callback {\n\n        void onResponseReceived(String eventId, JSONObject wholeJsonResponse, String dataFeldValue);\n\n        void onError(String eventId, Throwable exception);\n    }\n\n    private final Timer pushCheckTimer;\n    private final PushListener pushListener;\n\n    public BackendService(final PushListener pushListener) {\n        this.pushListener = pushListener;\n\n        if (this.pushListener != null) {\n            this.pushCheckTimer = new Timer() {\n                @Override\n                public void run() {\n                    checkPushEvents();\n                }\n            };\n            this.pushCheckTimer.scheduleRepeating(1000);\n        } else {\n            this.pushCheckTimer = null;\n        }\n    }\n\n    private void checkPushEvents() {\n        try {\n            final RequestBuilder rb = new RequestBuilder(RequestBuilder.GET, makeUrlForResource(\"__mailbox__\"));\n            rb.setHeader(\"Accept\", \"application/json\");\n\n            rb.sendRequest(\"\", new RequestCallback() {\n                @Override\n                public void onResponseReceived(Request request, Response response) {\n                    switch (response.getStatusCode()) {\n                        case 204: {\n                            // there are no push events\n                        }break;\n                        case 200: {\n                            final JSONObject jobj = (JSONObject) JSONParser.parseStrict(response.getText());\n                            if (!pushListener.onPushEvent(jobj)){\n                                pushCheckTimer.cancel();\n                            }\n                        }\n                        break;\n                        default: {\n                            if (!pushListener.onPushSystemError(new Throwable(\"Not OK response : \" + response.getStatusCode()))){\n                                pushCheckTimer.cancel();\n                            }\n                        }\n                        break;\n                    }\n                }\n\n                @Override\n                public void onError(Request request, Throwable exception) {\n                    if (!pushListener.onPushSystemError(exception)){\n                        pushCheckTimer.cancel();\n                    }\n                }\n            });\n        } catch (RequestException ex) {\n            if (!pushListener.onPushSystemError(ex)){\n                pushCheckTimer.cancel();\n            }\n        }\n    }\n\n    public void doDataRequest(final String eventId, final String dataFieldValue, final Callback reqCallback) {\n        try {\n            final RequestBuilder rb = new RequestBuilder(RequestBuilder.POST, makeUrlForResource(eventId));\n            rb.setHeader(\"Content-Type\", \"application/json; charset=utf-8\");\n            rb.setHeader(\"Accept\", \"application/json\");\n\n            final JSONObject jsonObj = new JSONObject();\n            jsonObj.put(\"Data\", new JSONString(dataFieldValue));\n\n            rb.sendRequest(jsonObj.toString(), new RequestCallback() {\n                @Override\n                public void onResponseReceived(Request request, Response response) {\n                    switch (response.getStatusCode()) {\n                        case 0: {\n                            reqCallback.onError(eventId, new Throwable(\"Server is unavaliable\"));\n                        }\n                        break;\n                        case 200: {\n                            final JSONObject jobj = (JSONObject) JSONParser.parseStrict(response.getText());\n                            reqCallback.onResponseReceived(eventId, jobj, ((JSONString) jobj.get(\"Data\")).stringValue());\n                        }\n                        break;\n                        default: {\n                            reqCallback.onError(eventId, new Throwable(\"Unexpected response code : \" + response.getStatusCode()));\n                        }\n                        break;\n                    }\n                }\n\n                @Override\n                public void onError(Request request, Throwable exception) {\n                    reqCallback.onError(eventId, exception);\n                }\n            });\n        } catch (RequestException e) {\n            reqCallback.onError(eventId, e);\n        }\n    }\n\n    private static String makeUrlForResource(final String path) {\n        final UrlBuilder urlBuilder = new UrlBuilder();\n        urlBuilder.setHost(Window.Location.getHost());\n        urlBuilder.setPath(path);\n\n        final String port = Window.Location.getPort();\n        if (!port.isEmpty()) {\n            urlBuilder.setPort(Integer.parseInt(port));\n        }\n\n        return urlBuilder.buildString();\n    }\n\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/frontend/src/main/java/com/igormaznitsa/client/FrontendMain.java",
    "content": "package com.igormaznitsa.client;\n\nimport com.google.gwt.core.client.EntryPoint;\nimport com.google.gwt.core.shared.GWT;\nimport com.google.gwt.i18n.client.DateTimeFormat;\nimport com.google.gwt.json.client.JSONObject;\nimport com.google.gwt.user.client.Window;\nimport com.google.gwt.user.client.ui.Button;\nimport com.google.gwt.user.client.ui.Label;\nimport com.google.gwt.user.client.ui.RootPanel;\nimport com.google.gwt.user.client.ui.TextBox;\n\nimport java.util.Date;\nimport java.util.logging.Logger;\n\npublic class FrontendMain implements EntryPoint, BackendService.PushListener {\n    private static final Logger LOGGER = Logger.getLogger(\"FrontendMain\");\n    \n    private static final DateTimeFormat timeFormatter = DateTimeFormat.getFormat(\"HH:mm:ss\");\n    \n    private final Messages messages = GWT.create(Messages.class);\n    private Label errorLabel;\n    private Label messageLabel;\n    private Label timerLabel;\n    private Button sendButton;\n    \n    private BackendService backend;\n    \n    @Override\n    public void onModuleLoad() {\n        sendButton = new Button(messages.sendButton());\n        final TextBox nameField = new TextBox();\n        nameField.setText(messages.nameField());\n        errorLabel = new Label();\n        messageLabel = new Label();\n        timerLabel = new Label(\"--:--:--\");\n        \n        // We can add style names to widgets\n        sendButton.addStyleName(\"sendButton\");\n\n        // Add components into named zones of page\n        // Use RootPanel.get() to get the entire body element\n        RootPanel.get(\"nameFieldContainer\").add(nameField);\n        RootPanel.get(\"sendButtonContainer\").add(sendButton);\n        RootPanel.get(\"messageLabelContainer\").add(this.messageLabel);\n        RootPanel.get(\"errorLabelContainer\").add(this.errorLabel);\n        RootPanel.get(\"timerZone\").add(this.timerLabel);\n        \n        // Focus the cursor on the name field when the app loads\n        nameField.setFocus(true);\n        nameField.selectAll();\n\n        sendButton.addClickHandler(event -> {\n            sendButton.setEnabled(false);\n            errorLabel.setText(\"\");\n            messageLabel.setText(\"\");\n\n            backend.doDataRequest(\"buttons/send\", nameField.getText(), new BackendService.Callback(){\n                @Override\n                public void onResponseReceived(String eventId, JSONObject wholeJsonResponse, String dataFeldValue) {\n                    messageLabel.setText(dataFeldValue);\n                    sendButton.setEnabled(true);\n                }\n\n                @Override\n                public void onError(String eventId, Throwable exception) {\n                    LOGGER.severe(\"Error '\"+eventId+\"', \"+exception);\n                    errorLabel.setText(exception.getMessage());\n                    sendButton.setEnabled(true);\n                }\n\n            });\n        });\n        \n        nameField.addKeyDownHandler(event -> {\n            // if enter then send data\n            if (event.getNativeKeyCode() == 13) {\n             sendButton.click();\n            }\n        });\n        \n        this.backend = new BackendService(this);\n    }\n\n    @Override\n    public boolean onPushEvent(final JSONObject event) {\n        final long time = (long)event.get(\"Time\").isNumber().doubleValue();\n        this.timerLabel.setText(timeFormatter.format(new Date(time)));\n        return true;\n    }\n\n    @Override\n    public boolean onPushSystemError(final Throwable thr) {\n        this.timerLabel.setText(\"Can't get time from server\");\n        Window.alert(\"Detected error in push event system : \"+thr.getMessage());\n        return false;\n    }\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/frontend/src/main/java/com/igormaznitsa/client/Messages.java",
    "content": "package com.igormaznitsa.client;\n\nimport com.google.gwt.i18n.client.LocalizableResource.Generate;\n\n@Generate(format = \"com.google.gwt.i18n.server.PropertyCatalogFactory\")\npublic interface Messages extends com.google.gwt.i18n.client.Messages {\n  \n  @DefaultMessage(\"Enter your name\")\n  String nameField();\n\n  @DefaultMessage(\"Send\")\n  String sendButton();\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/frontend/src/main/resources/com/igormaznitsa/client/Messages_fr.properties",
    "content": "sendButton = Envoyer\nnameField = Entrez votre nom"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/frontend/src/main/resources/com/igormaznitsa/gwtfrontend.gwt.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module rename-to=\"gwtfront\">\n  <!-- Inherit the core Web Toolkit stuff.                        -->\n  <inherits name='com.google.gwt.user.User' />\n\n  <!-- Inherit the default GWT style sheet.  You can change       -->\n  <!-- the theme of your GWT application by uncommenting          -->\n  <!-- any one of the following lines.                            -->\n  <inherits name='com.google.gwt.user.theme.standard.Standard' />\n  <inherits name=\"com.google.gwt.json.JSON\" />\n  <inherits name=\"com.google.gwt.logging.Logging\"/>\n\n  <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->\n  <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->\n\n  <!-- Other module inherits                                      -->\n\n  <!-- Specify the app entry point class.                         -->\n  <entry-point class='com.igormaznitsa.client.FrontendMain' />\n\n  <!-- Specify the paths for translatable code                    -->\n  <source path='client' />\n\n</module>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/frontend/src/main/webapp/WEB-INF/web.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE web-app\n    PUBLIC \"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN\"\n    \"http://java.sun.com/dtd/web-app_2_3.dtd\">\n\n<web-app>\n\n  <!-- Default page to serve -->\n  <welcome-file-list>\n    <welcome-file>index.html</welcome-file>\n  </welcome-file-list>\n\n</web-app>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/frontend/src/main/webapp/index.html",
    "content": "<!doctype html>\n<!-- The DOCTYPE declaration above will set the    -->\n<!-- browser's rendering engine into               -->\n<!-- \"Standards Mode\". Replacing this declaration  -->\n<!-- with a \"Quirks Mode\" doctype may lead to some -->\n<!-- differences in layout.                        -->\n\n<html>\n    <head>\n        <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n        <link type=\"text/css\" rel=\"stylesheet\" href=\"main.css\">\n        <link rel=\"shortcut icon\" href=\"/favicon.ico\" type=\"image/x-icon\">\n        <link rel=\"icon\" href=\"/favicon.ico\" type=\"image/x-icon\">\n        <title>GoLang+GWT Example</title>\n        <script type=\"text/javascript\" language=\"javascript\" src=\"gwtfront/gwtfront.nocache.js\"></script>\n    </head>\n\n    <body>\n        <!-- OPTIONAL: include this if you want history support -->\n        <iframe src=\"javascript:''\" id=\"__gwt_historyFrame\" tabIndex='-1' style=\"position:absolute;width:0;height:0;border:0\"></iframe>\n        <!-- RECOMMENDED if your web app will not function without JavaScript enabled -->\n        <noscript>\n        <div style=\"width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif\">\n            Your web browser must have JavaScript enabled\n            in order for this application to display correctly.\n        </div>\n        </noscript>\n\n        <table>\n            <tr>\n                <td rowspan=\"2\"><a target=\"_blank\" href=\"https://github.com/raydac/mvn-golang\"><img src=\"images/logo.png\"></a></td>\n                <td><div class=\"mainTitle\">GoLang+GWT Example</div></td>\n            </tr>\n            <tr>\n                <td><div class=\"subTitle\"><a target=\"_blank\" href=\"https://github.com/raydac/mvn-golang\">https://github.com/raydac/mvn-golang</a></div></td>\n            </tr>\n        </table>\n\n        <hr>\n        <table>\n            <tr><td>\n                    <table align=\"left\">\n                        <tr>\n                            <td colspan=\"2\" style=\"font-weight:bold;\">Please enter your name:</td>\n                        </tr>\n                        <tr>\n                            <td id=\"nameFieldContainer\"></td>\n                            <td id=\"sendButtonContainer\"></td>\n                        </tr>\n                        <tr>\n                            <td colspan=\"2\" style=\"color:red;\" id=\"errorLabelContainer\"></td>\n                        </tr>\n                        <tr>\n                            <td colspan=\"2\" style=\"color:green;\" id=\"messageLabelContainer\"></td>\n                        </tr>\n                    </table>\n                </td></tr>\n            <tr><td>\n                    <table>\n                        <tr>\n                            <td>Time on the server side:</td>\n                            <td id=\"timerZone\"></td>\n                        </tr>\n                    </table>\n                </td></tr>\n        </table>\n        <div class=\"bottomRecord\"><a href=\"http://www.igormaznitsa.com\">2018, Igor Maznitsa, Tallinn</a></div>\n    </body>\n</html>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/frontend/src/main/webapp/main.css",
    "content": "body {\n    margin-top: 5% !important;\n    margin-bottom: 5% !important;\n    margin-left:  10% !important;\n    margin-right: 10% !important;\n}\n\n.mainTitle {\n    text-align: left;\n    margin-left: 40px;\n    font-size: 48pt;\n    font-weight: bold;\n    color: darkgray;\n}\n\n.subTitle {\n    text-align: center;\n    margin-left: 40px;\n    font-size: 20pt;\n    font-weight: bold;\n    color: darkgray;\n}\n\n.sendButton {\n  display: block;\n  font-size: 16pt;\n}\n\n.bottomRecord {\n    text-align: right;\n}\n\n.bottomRecord a {\n    color: cornflowerblue !important;\n    text-decoration: none !important;\n}\n\n/** Most GWT widgets already have a style name defined */\n.gwt-DialogBox {\n  width: 400px;\n}\n\n.dialogVPanel {\n  margin: 5px;\n}\n\n.serverResponseLabelError {\n  color: red;\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/frontend/src/test/resources/com/igormaznitsa/gotestJUnit.gwt.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module rename-to=\"gotest\">\n  <!-- Inherit our applications main module.                      -->\n  <inherits name='com.igormaznitsa.gotest' />\n\n  <!-- Specify the path to any remote services.                   -->\n  <servlet path=\"/gotest/greet\" class=\"com.igormaznitsa.server.GreetingServiceImpl\" />\n\n</module>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-gui-gwt/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <groupId>com.igormaznitsa.go-gwt</groupId>\n  <artifactId>mvn-golang-example-gui-gwt</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    <mvn.golang.version>${main-project-version}</mvn.golang.version>\n    <maven.compiler.source>1.8</maven.compiler.source>\n    <maven.compiler.target>1.8</maven.compiler.target>\n    <gwt.version>2.11.0</gwt.version>\n  </properties>\n\n  <modules>\n    <module>frontend</module>\n    <module>backend</module>\n  </modules>\n\n  <dependencyManagement>\n    <dependencies>\n      <dependency>\n        <groupId>org.gwtproject</groupId>\n        <artifactId>gwt</artifactId>\n        <version>${gwt.version}</version>\n        <type>pom</type>\n        <scope>import</scope>\n      </dependency>\n    </dependencies>\n  </dependencyManagement>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-helloworld/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-helloworld</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>Hello World example</name>\n  <description>Example of minimalistic usage of mvn-golang-wrapper to build a 'Hello World' example.</description>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n\n    <plugins>\n      <plugin>\n        <artifactId>exec-maven-plugin</artifactId>\n        <groupId>org.codehaus.mojo</groupId>\n        <version>1.6.0</version>\n        <executions>\n          <execution>\n            <phase>initialize</phase>\n            <goals>\n              <goal>exec</goal>\n            </goals>\n            <configuration>\n              <executable>bash</executable>\n              <arguments>\n                <arg>-c</arg>\n                <arg>echo build.date.stamp=`date +%Y%m%d.%H%M%S`</arg>\n              </arguments>\n              <outputFile>${project.build.directory}/timestamp.properties</outputFile>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>properties-maven-plugin</artifactId>\n        <version>1.0.0</version>\n        <executions>\n          <execution>\n            <phase>initialize</phase>\n            <goals>\n              <goal>read-project-properties</goal>\n            </goals>\n            <configuration>\n              <files>\n                <file>${project.build.directory}/timestamp.properties</file>\n              </files>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n          <goVersion>${go.sdk.version}</goVersion>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-build</id>\n            <configuration>\n              <ldFlags>\n                <flag>-X</flag>\n                <flag>\"main.Buildstamp=${build.date.stamp}\"</flag>\n                <flag>-X</flag>\n                <flag>\"main.svnRevision=22543\"</flag>\n              </ldFlags>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-test</id>\n            <phase>none</phase>\n          </execution>\n          <execution>\n            <id>go-vet</id>\n            <phase>test-compile</phase>\n            <goals>\n              <goal>vet</goal>\n            </goals>\n            <configuration>\n              <ignoreErrorExitCode>true</ignoreErrorExitCode>\n              <outLogFile>vet.out.log</outLogFile>\n              <errLogFile>vet.err.log</errLogFile>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-enforcer-plugin</artifactId>\n        <version>3.0.0-M3</version>\n        <executions>\n          <execution>\n            <id>check-vet-out-log-size</id>\n            <phase>test-compile</phase>\n            <goals>\n              <goal>enforce</goal>\n            </goals>\n            <configuration>\n              <rules>\n                <requireFilesSize>\n                  <maxsize>0</maxsize>\n                  <minsize>0</minsize>\n                  <files>\n                    <file>${project.build.directory}${file.separator}reports${file.separator}vet.out.log</file>\n                  </files>\n                </requireFilesSize>\n              </rules>\n              <fail>true</fail>\n            </configuration>\n          </execution>\n          <execution>\n            <id>check-vet-err-log-size</id>\n            <phase>test-compile</phase>\n            <goals>\n              <goal>enforce</goal>\n            </goals>\n            <configuration>\n              <rules>\n                <requireFilesSize>\n                  <minsize>100</minsize>\n                  <maxsize>200</maxsize>\n                  <files>\n                    <file>${project.build.directory}${file.separator}reports${file.separator}vet.err.log</file>\n                  </files>\n                </requireFilesSize>\n              </rules>\n              <fail>true</fail>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-helloworld/src/main.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\t\"sync/atomic\"\n)\n\nvar Buildstamp string\nvar svnRevision string\n\nfunc FunctionForVetReport() {\n\tvar a int32 = 0\n\n\tvar wg sync.WaitGroup\n\tfor i := 0; i < 500; i++ {\n\t\twg.Add(1)\n\t\tgo func() {\n\t\t\ta = atomic.AddInt32(&a, 1)\n\t\t\twg.Done()\n\t\t}()\n\t}\n\twg.Wait()\n}\n\nfunc main() {\n\tfmt.Printf(Buildstamp + \" \" + svnRevision + \"\\n\")\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-helloworld-gomod/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-examples</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>mvn-golang-example-helloworld-gomod</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n    <packaging>mvn-golang</packaging>\n\n    <name>Hello World with go.mod example</name>\n    <description>Example of go.mod use to get needed dependencies.</description>\n    <url>https://www.mycodesmells.com/post/go-modules-example</url>\n\n    <build>\n        <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n        <directory>${basedir}${file.separator}bin</directory>\n\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <version>${main-project-version}</version>\n                <extensions>true</extensions>\n                <configuration>\n                    <goVersion>${go.sdk.version}</goVersion>\n                    <moduleMode>true</moduleMode>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>go-list</id>\n                        <goals>\n                            <goal>list</goal>\n                        </goals>\n                        <configuration>\n                            <format>{{.String}}</format>\n                            <!--json>true</json-->\n                            <listModules>true</listModules>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>do-run</id>\n                        <goals>\n                            <goal>run</goal>\n                        </goals>\n                        <configuration>\n                            <packages>\n                                <package>main.go</package>\n                            </packages>\n                            <args>\n                                <arg>-name</arg>\n                                <arg>somename</arg>\n                            </args>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-helloworld-gomod/src/go.mod",
    "content": "module github.com/mycodesmells/golang-examples/modules\n\n        require github.com/pkg/errors v0.9.1\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-helloworld-gomod/src/go.sum",
    "content": "github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-helloworld-gomod/src/main.go",
    "content": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"github.com/pkg/errors\"\n)\n\n// parts of https://www.mycodesmells.com/post/go-modules-example in use\nfunc main() {\n\tname := flag.String(\"name\", \"\", \"name\")\n\tflag.Parse()\n\n\tif err := greet(*name); err != nil {\n\t\tfmt.Printf(\"Failed to greet you: %v\", err)\n\t}\n}\n\nfunc greet(name string) error {\n\tif name == \"\" {\n\t\treturn errors.New(\"no name provided\")\n\t}\n\tfmt.Printf(\"Hello %s! I'm not in the $GOPATH!\\n\", name)\n\treturn nil\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-helloworld-multisrc/lib1/src/pack1/src1some.go",
    "content": "package pack1\n\nfunc Pack1() string {\n    return \"Pack1\"\n}"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-helloworld-multisrc/lib2/src/pack2/src2some.go",
    "content": "package pack2\n\nimport (\n    \"pack1\"\n)\n\nfunc Pack2() string {\n    return \"Pack2-\" + pack1.Pack1()\n}"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-helloworld-multisrc/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-helloworld-multisrc</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>Hello World multi-src example</name>\n  <description>Example of minimalistic usage of mvn-golang-wrapper to build a 'Hello World' example with multiple source folders.</description>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n          <addToGoPath>\n            <lib1>${basedir}${file.separator}lib1</lib1>\n            <lib2>${basedir}${file.separator}lib2</lib2>\n          </addToGoPath>\n        </configuration>\n        <executions>\n          <execution>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-helloworld-multisrc/src/main.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"pack2\"\n)\n\nfunc main() {\n\tfmt.Printf(\"Hello, \" + pack2.Pack2() + \"\\n\")\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-logrus/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-logrus</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>Go Logrus use example</name>\n  <description>Example of use Logrus library from https://banzaicloud.com/blog/runtime-logging/</description>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-get</id>\n            <configuration>\n              <packages>\n                <package>github.com/sirupsen/logrus</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n    \n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-logrus/src/gologrus.go",
    "content": "package main\n\nimport (\n\tlog \"github.com/sirupsen/logrus\"\n\t\"os\"\n)\n\nfunc init() {\n\t// Log as JSON instead of the default ASCII formatter.\n\tlog.SetFormatter(&log.JSONFormatter{})\n\n\t// Output to stdout instead of the default stderr\n\t// Can be any io.Writer, see below for File example\n\tlog.SetOutput(os.Stdout)\n\n\t// Only log the info severity or above.\n\tlog.SetLevel(log.InfoLevel)\n}\n\nfunc foo() {\n\tlog.WithFields(log.Fields{\n\t\t\"prefix\":      \"sensor\",\n\t\t\"temperature\": -4,\n\t}).Info(\"Temperature changes\")\n}\n\nfunc main() {\n\tfoo()\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-app/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-maven-module-mix</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-go-test-mix-app</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <dependencies>\n    <dependency>\n      <groupId>com.igormaznitsa</groupId>\n      <artifactId>mvn-go-test-mix-terminal</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n      <type>mvn-golang</type>\n    </dependency>\n    <dependency>\n      <groupId>com.igormaznitsa</groupId>\n      <artifactId>mvn-go-test-mix-proxy</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n      <type>mvn-golang</type>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>print-module-graph</id>\n            <phase>validate</phase>\n            <goals>\n              <goal>mod</goal>\n            </goals>\n            <configuration>\n             <command>graph</command>\n            </configuration>\n          </execution>\n          <execution>\n            <id>do-vet</id>\n            <goals>\n              <goal>vet</goal>\n            </goals>\n          </execution>\n          <execution>\n            <id>do-run</id>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-app/src/go.mod",
    "content": "module main\n\nrequire (\n\tcom.igormaznitsa/testmixproxy v1.0.0\n\tcom.igormaznitsa/testmixterminal v1.0.0\n)\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-app/src/go.sum",
    "content": "github.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd h1:XtfPmj9tQRilnrEmI1HjQhxXWRhEM+m8CACtaMJE/kM=\ngithub.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd/go.mod h1:vjcQJUZJYD3MeVGhtZXSMnCHfUNZxsyYzJt90eCYxK4=\ngithub.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e h1:p1yVGRW3nmb85p1Sh1ZJSDm4A4iKLS5QNbvUHMgGu/M=\ngithub.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=\ngithub.com/gizak/termui/v3 v3.0.0 h1:NYTUG6ig/sJK05O5FyhWemwlVPO8ilNpvS/PgRtrKAE=\ngithub.com/gizak/termui/v3 v3.0.0/go.mod h1:uinu2dMdtMI+FTIdEFUJQT5y+KShnhQRshvPblXq3lY=\ngithub.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=\ngithub.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=\ngithub.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM=\ngithub.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=\ngithub.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840=\ngithub.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=\ngolang.org/x/arch v0.0.0-20181203225421-5a4828bb7045/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8=\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-app/src/main.go",
    "content": "package main\n\nimport (\n\t\"com.igormaznitsa/testmixproxy\"\n\t\"com.igormaznitsa/testmixterminal\"\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc main() {\n\tif len(os.Args) > 1 {\n\t\targ := os.Args[1]\n\t\tif arg == \"proxy\" {\n\t\t\tfmt.Println(\"Selected proxy\")\n\t\t\ttestmixproxy.StartProxy()\n\t\t} else if arg == \"terminal\" {\n\t\t\tfmt.Println(\"Selected terminal\")\n\t\t\ttestmixterminal.StartTerminal()\n\t\t} else {\n\t\t\tfmt.Println(\"Hello world!\")\n\t\t}\n\t} else {\n\t\tfmt.Println(\"Select 'proxy' or 'teminal'\")\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-proxy/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-maven-module-mix</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-go-test-mix-proxy</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-proxy/src/com.igormaznitsa/testmixproxy/Proxy.go",
    "content": "package testmixproxy\n\nimport (\n\t\"flag\"\n\t\"github.com/elazarl/goproxy\"\n\t\"log\"\n\t\"net/http\"\n)\n\nfunc StartProxy() {\n\tverbose := flag.Bool(\"v\", false, \"should every proxy request be logged to stdout\")\n\taddr := flag.String(\"addr\", \":8080\", \"proxy listen address\")\n\tflag.Parse()\n\tproxy := goproxy.NewProxyHttpServer()\n\tproxy.OnRequest().HandleConnect(goproxy.AlwaysMitm)\n\tproxy.OnRequest().DoFunc(func(req *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response) {\n\t\tif req.URL.Scheme == \"https\" {\n\t\t\treq.URL.Scheme = \"http\"\n\t\t}\n\t\treturn req, nil\n\t})\n\tproxy.Verbose = *verbose\n\tlog.Fatal(http.ListenAndServe(*addr, proxy))\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-proxy/src/com.igormaznitsa/testmixproxy/go.mod",
    "content": "module com.igormaznitsa/testmixproxy\n\nrequire github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-proxy/src/com.igormaznitsa/testmixproxy/go.sum",
    "content": "github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e h1:p1yVGRW3nmb85p1Sh1ZJSDm4A4iKLS5QNbvUHMgGu/M=\ngithub.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-terminal/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-maven-module-mix</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-go-test-mix-terminal</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-terminal/src/com.igormaznitsa/testmixterminal/Terminal.go",
    "content": "package testmixterminal\n\nimport (\n\t\"log\"\n\t\"math\"\n\t\"time\"\n\n\tui \"github.com/gizak/termui/v3\"\n\t\"github.com/gizak/termui/v3/widgets\"\n)\n\nfunc StartTerminal() {\n\tif err := ui.Init(); err != nil {\n\t\tlog.Fatalf(\"failed to initialize termui: %v\", err)\n\t}\n\tdefer ui.Close()\n\n\tp := widgets.NewParagraph()\n\tp.Title = \"Text Box\"\n\tp.Text = \"PRESS q TO QUIT DEMO\"\n\tp.SetRect(0, 0, 50, 5)\n\tp.TextStyle.Fg = ui.ColorWhite\n\tp.BorderStyle.Fg = ui.ColorCyan\n\n\tupdateParagraph := func(count int) {\n\t\tif count%2 == 0 {\n\t\t\tp.TextStyle.Fg = ui.ColorRed\n\t\t} else {\n\t\t\tp.TextStyle.Fg = ui.ColorWhite\n\t\t}\n\t}\n\n\tlistData := []string{\n\t\t\"[0] gizak/termui\",\n\t\t\"[1] editbox.go\",\n\t\t\"[2] interrupt.go\",\n\t\t\"[3] keyboard.go\",\n\t\t\"[4] output.go\",\n\t\t\"[5] random_out.go\",\n\t\t\"[6] dashboard.go\",\n\t\t\"[7] nsf/termbox-go\",\n\t}\n\n\tl := widgets.NewList()\n\tl.Title = \"List\"\n\tl.Rows = listData\n\tl.SetRect(0, 5, 25, 12)\n\tl.TextStyle.Fg = ui.ColorYellow\n\n\tg := widgets.NewGauge()\n\tg.Title = \"Gauge\"\n\tg.Percent = 50\n\tg.SetRect(0, 12, 50, 15)\n\tg.BarColor = ui.ColorRed\n\tg.BorderStyle.Fg = ui.ColorWhite\n\tg.TitleStyle.Fg = ui.ColorCyan\n\n\tsparklineData := []float64{4, 2, 1, 6, 3, 9, 1, 4, 2, 15, 14, 9, 8, 6, 10, 13, 15, 12, 10, 5, 3, 6, 1, 7, 10, 10, 14, 13, 6, 4, 2, 1, 6, 3, 9, 1, 4, 2, 15, 14, 9, 8, 6, 10, 13, 15, 12, 10, 5, 3, 6, 1, 7, 10, 10, 14, 13, 6, 4, 2, 1, 6, 3, 9, 1, 4, 2, 15, 14, 9, 8, 6, 10, 13, 15, 12, 10, 5, 3, 6, 1, 7, 10, 10, 14, 13, 6, 4, 2, 1, 6, 3, 9, 1, 4, 2, 15, 14, 9, 8, 6, 10, 13, 15, 12, 10, 5, 3, 6, 1, 7, 10, 10, 14, 13, 6}\n\n\tsl := widgets.NewSparkline()\n\tsl.Title = \"srv 0:\"\n\tsl.Data = sparklineData\n\tsl.LineColor = ui.ColorCyan\n\tsl.TitleStyle.Fg = ui.ColorWhite\n\n\tsl2 := widgets.NewSparkline()\n\tsl2.Title = \"srv 1:\"\n\tsl2.Data = sparklineData\n\tsl2.TitleStyle.Fg = ui.ColorWhite\n\tsl2.LineColor = ui.ColorRed\n\n\tslg := widgets.NewSparklineGroup(sl, sl2)\n\tslg.Title = \"Sparkline\"\n\tslg.SetRect(25, 5, 50, 12)\n\n\tsinData := (func() []float64 {\n\t\tn := 220\n\t\tps := make([]float64, n)\n\t\tfor i := range ps {\n\t\t\tps[i] = 1 + math.Sin(float64(i)/5)\n\t\t}\n\t\treturn ps\n\t})()\n\n\tlc := widgets.NewPlot()\n\tlc.Title = \"dot-marker Line Chart\"\n\tlc.Data = make([][]float64, 1)\n\tlc.Data[0] = sinData\n\tlc.SetRect(0, 15, 50, 25)\n\tlc.AxesColor = ui.ColorWhite\n\tlc.LineColors[0] = ui.ColorRed\n\tlc.Marker = widgets.MarkerDot\n\n\tbarchartData := []float64{3, 2, 5, 3, 9, 5, 3, 2, 5, 8, 3, 2, 4, 5, 3, 2, 5, 7, 5, 3, 2, 6, 7, 4, 6, 3, 6, 7, 8, 3, 6, 4, 5, 3, 2, 4, 6, 4, 8, 5, 9, 4, 3, 6, 5, 3, 6}\n\n\tbc := widgets.NewBarChart()\n\tbc.Title = \"Bar Chart\"\n\tbc.SetRect(50, 0, 75, 10)\n\tbc.Labels = []string{\"S0\", \"S1\", \"S2\", \"S3\", \"S4\", \"S5\"}\n\tbc.BarColors[0] = ui.ColorGreen\n\tbc.NumStyles[0] = ui.NewStyle(ui.ColorBlack)\n\n\tlc2 := widgets.NewPlot()\n\tlc2.Title = \"braille-mode Line Chart\"\n\tlc2.Data = make([][]float64, 1)\n\tlc2.Data[0] = sinData\n\tlc2.SetRect(50, 15, 75, 25)\n\tlc2.AxesColor = ui.ColorWhite\n\tlc2.LineColors[0] = ui.ColorYellow\n\n\tp2 := widgets.NewParagraph()\n\tp2.Text = \"Hey!\\nI am a borderless block!\"\n\tp2.Border = false\n\tp2.SetRect(50, 10, 75, 10)\n\tp2.TextStyle.Fg = ui.ColorMagenta\n\n\tdraw := func(count int) {\n\t\tg.Percent = count % 101\n\t\tl.Rows = listData[count%9:]\n\t\tslg.Sparklines[0].Data = sparklineData[:30+count%50]\n\t\tslg.Sparklines[1].Data = sparklineData[:35+count%50]\n\t\tlc.Data[0] = sinData[count/2%220:]\n\t\tlc2.Data[0] = sinData[2*count%220:]\n\t\tbc.Data = barchartData[count/2%10:]\n\n\t\tui.Render(p, l, g, slg, lc, bc, lc2, p2)\n\t}\n\n\ttickerCount := 1\n\tdraw(tickerCount)\n\ttickerCount++\n\tuiEvents := ui.PollEvents()\n\tticker := time.NewTicker(time.Second).C\n\tfor {\n\t\tselect {\n\t\tcase e := <-uiEvents:\n\t\t\tswitch e.ID {\n\t\t\tcase \"q\", \"<C-c>\":\n\t\t\t\treturn\n\t\t\t}\n\t\tcase <-ticker:\n\t\t\tupdateParagraph(tickerCount)\n\t\t\tdraw(tickerCount)\n\t\t\ttickerCount++\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-terminal/src/com.igormaznitsa/testmixterminal/go.mod",
    "content": "module com.igormaznitsa/testmixterminal\n\ngo 1.14\n\nrequire github.com/gizak/termui/v3 v3.0.0\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/mvn-go-test-mix-terminal/src/com.igormaznitsa/testmixterminal/go.sum",
    "content": "github.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd h1:XtfPmj9tQRilnrEmI1HjQhxXWRhEM+m8CACtaMJE/kM=\ngithub.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd/go.mod h1:vjcQJUZJYD3MeVGhtZXSMnCHfUNZxsyYzJt90eCYxK4=\ngithub.com/gizak/termui/v3 v3.0.0 h1:NYTUG6ig/sJK05O5FyhWemwlVPO8ilNpvS/PgRtrKAE=\ngithub.com/gizak/termui/v3 v3.0.0/go.mod h1:uinu2dMdtMI+FTIdEFUJQT5y+KShnhQRshvPblXq3lY=\ngithub.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=\ngithub.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=\ngithub.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM=\ngithub.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=\ngithub.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840=\ngithub.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=\ngolang.org/x/arch v0.0.0-20181203225421-5a4828bb7045/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8=\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-module-mix/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-maven-module-mix</artifactId>\n  <packaging>pom</packaging>\n\n  <description>Example of use maven dependency together with golang modules</description>\n\n  <properties>\n    <mvn.golang.module.mode>true</mvn.golang.module.mode>\n  </properties>\n\n  <modules>\n    <module>mvn-go-test-mix-terminal</module>\n    <module>mvn-go-test-mix-proxy</module>\n    <module>mvn-go-test-mix-app</module>\n  </modules>\n\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-app/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-maven-repository</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-go-test-app</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <dependencies>\n    <dependency>\n      <groupId>com.igormaznitsa</groupId>\n      <artifactId>mvn-go-test-lib</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n      <type>mvn-golang</type>\n    </dependency>\n    <dependency>\n      <groupId>com.igormaznitsa</groupId>\n      <artifactId>mvn-go-test-libtwo</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n      <type>mvn-golang</type>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>do-vet</id>\n            <goals>\n              <goal>vet</goal>\n            </goals>\n          </execution>\n          <execution>\n            <id>do-run</id>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <env>\n                <GO111MODULE>off</GO111MODULE>\n              </env>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-app/src/main.go",
    "content": "package main\n\nimport (\n\t\"com.igormaznitsa/mvngotest\"\n\t\"com.igormaznitsa/mvngotesttwo\"\n)\n\nfunc main() {\n\tmvngotest.SomeTestMethod()\n\tmvngotesttwo.SomeTestMethodTwo()\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-lib/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-maven-repository</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-go-test-lib</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <dependencies>\n    <dependency>\n      <groupId>com.igormaznitsa</groupId>\n      <artifactId>mvn-go-test-metalib</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n      <type>mvn-golang</type>\n    </dependency>\n  </dependencies>\n\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <buildMode>archive</buildMode>\n          <packages>\n            <package>./...</package>\n          </packages>\n          <env>\n            <GO111MODULE>off</GO111MODULE>\n          </env>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-lib/src/com.igormaznitsa/mvngotest/SomeUtils.go",
    "content": "package mvngotest\n\nimport (\n\tmeta \"com.igormaznitsa/mvngotestmeta\"\n\t\"fmt\"\n)\n\nvar Buildstamp string\nvar svnRevision string\n\nfunc SomeTestMethod() {\n\tfmt.Printf(meta.SomeMetaMethod(\"mvn-go-test-lib module\") + \"!\\n\")\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-lib/src/com.igormaznitsa/mvngotest/go.mod",
    "content": "module com.igormaznitsa/mvngotest\n\nrequire com.igormaznitsa/mvngotestmeta v1.0.0\n\nreplace com.igormaznitsa/mvngotestmeta => ../../../bin/.__deps__/mvn-go-test-metalib-1.0.0-SNAPSHOT/src/com.igormaznitsa/mvngotestmeta\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-libtwo/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-maven-repository</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-go-test-libtwo</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <dependencies>\n    <dependency>\n      <groupId>com.igormaznitsa</groupId>\n      <artifactId>mvn-go-test-metalib</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n      <type>mvn-golang</type>\n    </dependency>\n  </dependencies>\n\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <buildMode>archive</buildMode>\n          <packages>\n            <package>./...</package>\n          </packages>\n          <env>\n            <GO111MODULE>off</GO111MODULE>\n          </env>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-libtwo/src/com.igormaznitsa/mvngotesttwo/SomeUtils.go",
    "content": "package mvngotesttwo\n\nimport (\n\tmeta \"com.igormaznitsa/mvngotestmeta\"\n\t\"fmt\"\n)\n\nvar Buildstamp string\nvar svnRevision string\n\nfunc SomeTestMethodTwo() {\n\tfmt.Printf(meta.SomeMetaMethod(\"mvn-go-test-libtwo module\") + \"!\\n\")\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-libtwo/src/com.igormaznitsa/mvngotesttwo/go.mod",
    "content": "module com.igormaznitsa/mvngotesttwo\n\nrequire com.igormaznitsa/mvngotestmeta v1.0.0\n\nreplace com.igormaznitsa/mvngotestmeta => ../../../bin/.__deps__/mvn-go-test-metalib-1.0.0-SNAPSHOT/src/com.igormaznitsa/mvngotestmeta\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-metalib/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-maven-repository</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-go-test-metalib</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <buildMode>archive</buildMode>\n          <packages>\n            <package>./...</package>\n          </packages>\n          <env>\n            <GO111MODULE>off</GO111MODULE>\n          </env>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-metalib/src/com.igormaznitsa/mvngotestmeta/MetaUtils.go",
    "content": "package mvngotestmeta\n\nfunc SomeMetaMethod(arg string) string {\n\treturn \"Hello \" + arg\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/mvn-go-test-metalib/src/com.igormaznitsa/mvngotestmeta/go.mod",
    "content": "module com.igormaznitsa/mvngotestmeta\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-maven-repository/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-maven-repository</artifactId>\n  <packaging>pom</packaging>\n\n  <name>Example of dependency from Maven repository</name>\n  <description>Example how to use mvn-golang artifact saved in maven repository</description>\n\n  <properties>\n    <mvn.golang.preprocess.gomod>true</mvn.golang.preprocess.gomod>\n    <mvn.golang.restore.gomod>false</mvn.golang.restore.gomod>\n  </properties>\n\n  <modules>\n    <module>mvn-go-test-metalib</module>\n    <module>mvn-go-test-lib</module>\n    <module>mvn-go-test-libtwo</module>\n    <module>mvn-go-test-app</module>\n  </modules>\n\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/app-1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-multimodule</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>app-1</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>App-1</name>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    \n    <resources>\n      <resource>\n        <directory>${basedir}${file.separator}resources</directory>\n      </resource>\n    </resources>\n    \n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${mvn.golang.version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n          <addToGoPath>\n            <common>${basedir}/../common</common>\n          </addToGoPath>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/app-1/src/main.go",
    "content": "package main\n\nimport (\n\t\"common\"\n)\n\nfunc main() {\n\tcommon.PrintHello(\"world\")\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/app-1/src/main_test.go",
    "content": "package main\n\nimport \"testing\"\n\nfunc TestMain(t *testing.T) {\n\tmain()\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/app-2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-multimodule</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>app-2</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>App-2</name>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    \n    <resources>\n      <resource>\n        <directory>${basedir}${file.separator}resources</directory>\n      </resource>\n    </resources>\n    \n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${mvn.golang.version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n          <addToGoPath>\n            <common>${basedir}/../common</common>\n          </addToGoPath>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/app-2/src/main.go",
    "content": "package main\n\nimport \"common\"\n\nfunc main() {\n\tcommon.PrintHello(\"universe\")\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/app-2/src/main_test.go",
    "content": "package main\n\nimport \"testing\"\n\nfunc TestMain(t *testing.T) {\n\tmain()\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/assembly-results/deploy.xml",
    "content": "<assembly xmlns=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2\" \n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd\">\n  <id>dist-assembly</id>\n  \n  <formats>\n    <format>tar.gz</format>\n  </formats>\n  \n  <includeBaseDirectory>false</includeBaseDirectory>\n  <includeSiteDirectory>false</includeSiteDirectory>\n  <baseDirectory></baseDirectory>\n  \n  <fileSets>\n    <fileSet>\n      <directory>${project.basedir}${file.separator}..${file.separator}app-1${file.separator}bin</directory>\n      <outputDirectory>${file.separator}</outputDirectory>\n      <includes>\n        <include>app-1-${project.version}</include>\n        <include>app-1-${project.version}.exe</include>\n      </includes>\n    </fileSet>\n    <fileSet>\n      <directory>${project.basedir}${file.separator}..${file.separator}app-2${file.separator}bin</directory>\n      <outputDirectory>${file.separator}</outputDirectory>\n      <includes>\n        <include>app-2-${project.version}</include>\n        <include>app-2-${project.version}.exe</include>\n      </includes>\n    </fileSet>\n  </fileSets>\n  \n</assembly>"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/assembly-results/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-multimodule</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n    \n  <artifactId>assembly-results</artifactId>\n  <packaging>pom</packaging>\n    \n  <name>Assembly results</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>${project.groupId}</groupId>\n      <artifactId>app-1</artifactId>\n      <version>${project.version}</version>\n      <type>mvn-golang</type>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>${project.groupId}</groupId>\n      <artifactId>app-2</artifactId>\n      <version>${project.version}</version>\n      <type>mvn-golang</type>\n      <scope>provided</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <finalName>all-apps-${project.version}</finalName>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-clean-plugin</artifactId>\n        <version>3.0.0</version>\n        <configuration>\n          <followSymLinks>false</followSymLinks>\n          <excludeDefaultDirectories>true</excludeDefaultDirectories>\n          <filesets>\n            <fileset>\n              <directory>${basedir}${file.separator}target</directory>\n            </fileset>\n          </filesets>\n        </configuration>\n      </plugin>\n      <plugin>\n        <artifactId>maven-assembly-plugin</artifactId>\n        <version>3.1.0</version>\n        <configuration>\n          <appendAssemblyId>false</appendAssemblyId>\n          <outputDirectory>${basedir}/target</outputDirectory>\n          <descriptors>\n            <descriptor>${basedir}/deploy.xml</descriptor>\n          </descriptors>\n        </configuration>\n        <executions>\n          <execution>\n            <id>create-archive</id>\n            <phase>package</phase>\n            <goals>\n              <goal>single</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n    \n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/common/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-example-multimodule</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>common</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>Common</name>\n\n  <properties>\n      <!-- the module must be disabled for install and deploy because it doesn't generate artifact -->\n      <maven.install.skip>true</maven.install.skip>\n      <maven.deploy.skip>true</maven.deploy.skip>\n      <mvn.golang.build.skip>true</mvn.golang.build.skip>\n  </properties>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    \n    <resources>\n      <resource>\n        <directory>${basedir}${file.separator}resources</directory>\n      </resource>\n    </resources>\n    \n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${mvn.golang.version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/common/src/common/common.go",
    "content": "package common\n\nimport \"fmt\"\n\nfunc PrintHello(name string) {\n\tfmt.Println(\"Hello,\" + name)\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/common/src/common/common_test.go",
    "content": "package common\n\nimport \"testing\"\n\nfunc TestPrintHello(t *testing.T) {\n\tPrintHello(\"Igor\")\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-multimodule/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-multimodule</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n    \n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    <mvn.golang.version>${main-project-version}</mvn.golang.version>\n  </properties>\n\n  <modules>\n    <module>common</module>\n    <module>app-1</module>\n    <module>app-2</module>\n    <module>assembly-results</module>\n  </modules>\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-nes/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-nes</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>NES emulator example</name>\n  <description>Example of mvn-golang-wrapper usage to build the NES emulator project : https://github.com/fogleman/nes</description>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <executions>\n          <execution>\n            <id>default-get</id>\n            <configuration>\n              <buildFlags>\n                <flag>-u</flag>\n              </buildFlags>\n              <autofixGitCache>true</autofixGitCache>\n              <packages>\n                <package>github.com/gordonklaus/portaudio</package>\n                <package>github.com/fogleman/nes</package>\n              </packages>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-build</id>\n            <configuration>\n              <echoWarn>\n                <warn>If error with native parts then install them with : sudo apt-get install portaudio19-dev libgl1-mesa-dev xorg-dev</warn>\n              </echoWarn>\n              <packages>\n                <package>github.com/fogleman/nes</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n    \n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-oak-shooter/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-oak-shooter</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>Oak shooter example</name>\n  <description>Example of Oak engine based 2D shooter.</description>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-resources-plugin</artifactId>\n        <version>3.2.0</version>\n        <executions>\n          <execution>\n            <id>copy-resources</id>\n            <phase>package</phase>\n            <goals>\n              <goal>copy-resources</goal>\n            </goals>\n            <configuration>\n              <outputDirectory>${project.build.directory}</outputDirectory>\n              <resources>\n                <resource>\n                  <directory>${project.basedir}${file.separator}resources</directory>\n                </resource>\n              </resources>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <moduleMode>true</moduleMode>\n          <mod>mod</mod>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-fix</id>\n            <phase>none</phase>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-oak-shooter/src/go.mod",
    "content": "module github.com/mycodesmells/golang-examples/modules\n\n        go 1.16\n\n        require github.com/oakmound/oak/v2 v2.5.0\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-oak-shooter/src/go.sum",
    "content": "github.com/200sc/go-dist v1.0.0 h1:Y9bl++4+d8NFv5hzwHyaxbXZmexVCic/rUdQOTq7Jec=\ngithub.com/200sc/go-dist v1.0.0/go.mod h1:+hhVw6j4BQF2HPwLFmsVM4VooSH9sn04apvH52hfboU=\ngithub.com/200sc/klangsynthese v0.2.2-0.20201022002431-a0e14a8c862b h1:6Gk8u6eHdE6Xcn3t3BDei1e83FUUw6eH/LhOiDECHr0=\ngithub.com/200sc/klangsynthese v0.2.2-0.20201022002431-a0e14a8c862b/go.mod h1:1yEA6LmYbsEoAPJx+JN+UQk7k5yXebfWsuM1yGPK/3s=\ngithub.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\ngithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=\ngithub.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=\ngithub.com/BurntSushi/xgbutil v0.0.0-20160919175755-f7c97cef3b4e/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=\ngithub.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046 h1:O/r2Sj+8QcMF7V5IcmiE2sMFV2q3J47BEirxbXJAdzA=\ngithub.com/BurntSushi/xgbutil v0.0.0-20190907113008-ad855c713046/go.mod h1:uw9h2sd4WWHOPdJ13MQpwK5qYWKYDumDqxWWIknEQ+k=\ngithub.com/akavel/polyclip-go v0.0.0-20160111220610-2cfdb71461bd h1:/DQAi5feF/aviHBeEK8mS1D/bm6gNFlUFtDkX0L7jOU=\ngithub.com/akavel/polyclip-go v0.0.0-20160111220610-2cfdb71461bd/go.mod h1:GwtPRvP/jvUpifg23D1jSVP93pV0cSV9fWOn9sG+HEo=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/disintegration/gift v1.2.0 h1:VMQeei2F+ZtsHjMgP6Sdt1kFjRhs2lGz8ljEOPeIR50=\ngithub.com/disintegration/gift v1.2.0/go.mod h1:Jh2i7f7Q2BM7Ezno3PhfezbR1xpUg9dUg3/RlKGr4HI=\ngithub.com/eaburns/bit v0.0.0-20131029213740-7bd5cd37375d/go.mod h1:CHkHWWZ4kbGY6jEy1+qlitDaCtRgNvCOQdakj/1Yl/Q=\ngithub.com/eaburns/flac v0.0.0-20171003200620-9a6fb92396d1/go.mod h1:frG94byMNy+1CgGrQ25dZ+17tf98EN+OYBQL4Zh612M=\ngithub.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=\ngithub.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=\ngithub.com/hajimehoshi/go-mp3 v0.3.1 h1:pn/SKU1+/rfK8KaZXdGEC2G/KCB2aLRjbTCrwKcokao=\ngithub.com/hajimehoshi/go-mp3 v0.3.1/go.mod h1:qMJj/CSDxx6CGHiZeCgbiq2DSUkbK0UbtXShQcnfyMM=\ngithub.com/hajimehoshi/oto v0.6.1/go.mod h1:0QXGEkbuJRohbJaxr7ZQSxnju7hEhseiPx2hrh6raOI=\ngithub.com/oakmound/libudev v0.2.1 h1:gaXuw7Pbt3RSRxbUakAjl0dSW6Wo3TZWpwS5aMq8+EA=\ngithub.com/oakmound/libudev v0.2.1/go.mod h1:zYF5CkHY+UP6lzWbPR+XoVAscl/s+OncWA//qWjMLUs=\ngithub.com/oakmound/oak/v2 v2.5.0 h1:gib2faJi7tOFsa9+vcEtnRWQGGJo8/4zRv35XMVhYL4=\ngithub.com/oakmound/oak/v2 v2.5.0/go.mod h1:4L4o4tQ3fGnEcXJ4lROTbbJsj6I5X11+/VaIOzGO7s8=\ngithub.com/oakmound/shiny v0.4.2 h1:QfkgNG4ktT0g8wTM6bjWn1uAPOBk6NoQVxD/Bvwt5xk=\ngithub.com/oakmound/shiny v0.4.2/go.mod h1:fEGagtAluRRrVkMQyzyL+G3j+TdsyOjrIajWunGmy3M=\ngithub.com/oakmound/w32 v2.0.0+incompatible/go.mod h1:lzloWlclSXIU4cDr67WF8qjFFDO8gHHBIk4Qqe90enQ=\ngithub.com/oakmound/w32 v2.1.0+incompatible/go.mod h1:lzloWlclSXIU4cDr67WF8qjFFDO8gHHBIk4Qqe90enQ=\ngithub.com/oov/directsound-go v0.0.0-20141101201356-e53e59c700bf/go.mod h1:RBXkZ8n2vvtdJP6PO+TbU/N/DVuCDwUN53CU+C1pJOs=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/yobert/alsa v0.0.0-20200618200352-d079056f5370 h1:I8PHpJWTMTJZVDoosy8aXslFGe7wvcUbol7fOrVy4Tc=\ngithub.com/yobert/alsa v0.0.0-20200618200352-d079056f5370/go.mod h1:CaowXBWOiSGWEpBBV8LoVnQTVPV4ycyviC9IBLj8dRw=\ngolang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=\ngolang.org/x/image v0.0.0-20201208152932-35266b937fa6 h1:nfeHNc1nAqecKCy2FCy4HY+soOOe5sDLJ/gZLbx6GYI=\ngolang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=\ngolang.org/x/mobile v0.0.0-20190307202846-d2e1c1c4a691/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=\ngolang.org/x/mobile v0.0.0-20190415191353-3e0bab5405d6 h1:vyLBGJPIl9ZYbcQFM2USFmJBK6KI+t+z6jL0lbwjrnc=\ngolang.org/x/mobile v0.0.0-20190415191353-3e0bab5405d6/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=\ngolang.org/x/net v0.0.0-20190310074541-c10a0554eabf/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI=\ngolang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sys v0.0.0-20190310054646-10058d7d4faa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190429190828-d89cdac9e872/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-oak-shooter/src/performance.go",
    "content": "package main\n\nimport (\n\t\"image/color\"\n\t\"math/rand\"\n\t\"path/filepath\"\n\t\"time\"\n\n\t\"github.com/oakmound/oak/v2/render/mod\"\n\n\toak \"github.com/oakmound/oak/v2\"\n\t\"github.com/oakmound/oak/v2/alg/floatgeom\"\n\t\"github.com/oakmound/oak/v2/collision\"\n\t\"github.com/oakmound/oak/v2/collision/ray\"\n\t\"github.com/oakmound/oak/v2/dlog\"\n\t\"github.com/oakmound/oak/v2/entities\"\n\t\"github.com/oakmound/oak/v2/event\"\n\t\"github.com/oakmound/oak/v2/key\"\n\t\"github.com/oakmound/oak/v2/mouse\"\n\t\"github.com/oakmound/oak/v2/physics\"\n\t\"github.com/oakmound/oak/v2/render\"\n\t\"github.com/oakmound/oak/v2/scene\"\n)\n\nconst (\n\tEnemy collision.Label = 1\n)\n\nvar (\n\tplayerAlive = true\n\t// Vectors are backed by pointers,\n\t// so despite this not being a pointer,\n\t// this does update according to the player's\n\t// position so long as we don't reset\n\t// the player's position vector\n\tplayerPos physics.Vector\n\n\tsheet [][]*render.Sprite\n)\n\nconst (\n\tfieldWidth  = 1000\n\tfieldHeight = 1000\n)\n\nfunc main() {\n\n\toak.Add(\"tds\", func(string, interface{}) {\n\t\t// Initialization\n\t\tplayerAlive = true\n\t\tvar err error\n\t\tsprites, err := render.GetSheet(filepath.Join(\"16x16\", \"sheet.png\"))\n\t\tdlog.ErrorCheck(err)\n\t\tsheet = sprites.ToSprites()\n\n\t\toak.SetViewportBounds(0, 0, fieldWidth, fieldHeight)\n\n\t\t// Player setup\n\t\teggplant, err := render.GetSprite(filepath.Join(\"character\", \"eggplant-fish.png\"))\n\t\tplayerR := render.NewSwitch(\"left\", map[string]render.Modifiable{\n\t\t\t\"left\": eggplant,\n\t\t\t// We must copy the sprite before we modify it, or \"left\"\n\t\t\t// will also be flipped.\n\t\t\t\"right\": eggplant.Copy().Modify(mod.FlipX),\n\t\t})\n\t\tif err != nil {\n\t\t\tdlog.Error(err)\n\t\t}\n\t\tchar := entities.NewMoving(100, 100, 32, 32,\n\t\t\tplayerR,\n\t\t\tnil, 0, 0)\n\n\t\tchar.Speed = physics.NewVector(5, 5)\n\t\tplayerPos = char.Point.Vector\n\t\trender.Draw(char.R, 1, 2)\n\n\t\tchar.Bind(func(id int, _ interface{}) int {\n\t\t\tchar := event.GetEntity(id).(*entities.Moving)\n\t\t\tchar.Delta.Zero()\n\t\t\tif oak.IsDown(key.W) {\n\t\t\t\tchar.Delta.ShiftY(-char.Speed.Y())\n\t\t\t}\n\t\t\tif oak.IsDown(key.A) {\n\t\t\t\tchar.Delta.ShiftX(-char.Speed.X())\n\t\t\t}\n\t\t\tif oak.IsDown(key.S) {\n\t\t\t\tchar.Delta.ShiftY(char.Speed.Y())\n\t\t\t}\n\t\t\tif oak.IsDown(key.D) {\n\t\t\t\tchar.Delta.ShiftX(char.Speed.X())\n\t\t\t}\n\t\t\tchar.ShiftPos(char.Delta.X(), char.Delta.Y())\n\t\t\t// Don't go out of bounds\n\t\t\tif char.X() < 0 {\n\t\t\t\tchar.SetX(0)\n\t\t\t} else if char.X() > fieldWidth-char.W {\n\t\t\t\tchar.SetX(fieldWidth - char.W)\n\t\t\t}\n\t\t\tif char.Y() < 0 {\n\t\t\t\tchar.SetY(0)\n\t\t\t} else if char.Y() > fieldHeight-char.H {\n\t\t\t\tchar.SetY(fieldHeight - char.H)\n\t\t\t}\n\t\t\toak.SetScreen(\n\t\t\t\tint(char.R.X())-oak.ScreenWidth/2,\n\t\t\t\tint(char.R.Y())-oak.ScreenHeight/2,\n\t\t\t)\n\t\t\thit := char.HitLabel(Enemy)\n\t\t\tif hit != nil {\n\t\t\t\tplayerAlive = false\n\t\t\t}\n\n\t\t\t// update animation\n\t\t\tswtch := char.R.(*render.Switch)\n\t\t\tif char.Delta.X() > 0 {\n\t\t\t\tif swtch.Get() == \"left\" {\n\t\t\t\t\tswtch.Set(\"right\")\n\t\t\t\t}\n\t\t\t} else if char.Delta.X() < 0 {\n\t\t\t\tif swtch.Get() == \"right\" {\n\t\t\t\t\tswtch.Set(\"left\")\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn 0\n\t\t}, event.Enter)\n\n\t\tchar.Bind(func(id int, me interface{}) int {\n\t\t\tchar := event.GetEntity(id).(*entities.Moving)\n\t\t\tmevent := me.(mouse.Event)\n\t\t\tx := char.X() + char.W/2\n\t\t\ty := char.Y() + char.H/2\n\t\t\tmx := mevent.X() + float64(oak.ViewPos.X)\n\t\t\tmy := mevent.Y() + float64(oak.ViewPos.Y)\n\t\t\tray.DefaultCaster.CastDistance = floatgeom.Point2{x, y}.Sub(floatgeom.Point2{mx, my}).Magnitude()\n\t\t\thits := ray.CastTo(floatgeom.Point2{x, y}, floatgeom.Point2{mx, my})\n\t\t\tfor _, hit := range hits {\n\t\t\t\thit.Zone.CID.Trigger(\"Destroy\", nil)\n\t\t\t}\n\t\t\trender.DrawForTime(\n\t\t\t\trender.NewLine(x, y, mx, my, color.RGBA{0, 128, 0, 128}),\n\t\t\t\ttime.Millisecond*50,\n\t\t\t\t1, 2)\n\t\t\treturn 0\n\t\t}, mouse.Press)\n\n\t\t// Create enemies periodically\n\t\tevent.GlobalBind(func(_ int, frames interface{}) int {\n\t\t\tf := frames.(int)\n\t\t\tif f%EnemyRefresh == 0 {\n\t\t\t\tNewEnemy()\n\t\t\t}\n\t\t\treturn 0\n\t\t}, event.Enter)\n\n\t\t// Draw the background\n\t\tfor x := 0; x < fieldWidth; x += 16 {\n\t\t\tfor y := 0; y < fieldHeight; y += 16 {\n\t\t\t\ti := rand.Intn(3) + 1\n\t\t\t\t// Get a random tile to draw in this position\n\t\t\t\tsp := sheet[i/2][i%2].Copy()\n\t\t\t\tsp.SetPos(float64(x), float64(y))\n\t\t\t\trender.Draw(sp, 0, 1)\n\t\t\t}\n\t\t}\n\n\t}, func() bool {\n\t\treturn playerAlive\n\t}, func() (string, *scene.Result) {\n\t\treturn \"tds\", nil\n\t})\n\n\t// This indicates to oak to automatically open and load image and audio\n\t// files local to the project before starting any scene.\n\toak.SetupConfig.BatchLoad = true\n\n\trender.SetDrawStack(\n\t\trender.NewCompositeR(),\n\t\trender.NewHeap(false),\n\t\trender.NewDrawFPS(),\n\t\trender.NewLogicFPS(),\n\t)\n\n\toak.Init(\"tds\")\n}\n\n// Top down shooter consts\nconst (\n\tEnemyRefresh = 25\n\tEnemySpeed   = 2\n)\n\n// NewEnemy creates an enemy for a top down shooter\nfunc NewEnemy() {\n\tx, y := enemyPos()\n\n\tenemyFrame := sheet[0][0].Copy()\n\tenemyR := render.NewSwitch(\"left\", map[string]render.Modifiable{\n\t\t\"left\":  enemyFrame,\n\t\t\"right\": enemyFrame.Copy().Modify(mod.FlipX),\n\t})\n\tenemy := entities.NewSolid(x, y, 16, 16,\n\t\tenemyR,\n\t\tnil, 0)\n\n\trender.Draw(enemy.R, 1, 2)\n\n\tenemy.UpdateLabel(Enemy)\n\n\tenemy.Bind(func(id int, _ interface{}) int {\n\t\tenemy := event.GetEntity(id).(*entities.Solid)\n\t\t// move towards the player\n\t\tx, y := enemy.GetPos()\n\t\tpt := floatgeom.Point2{x, y}\n\t\tpt2 := floatgeom.Point2{playerPos.X(), playerPos.Y()}\n\t\tdelta := pt2.Sub(pt).Normalize().MulConst(EnemySpeed)\n\t\tenemy.ShiftPos(delta.X(), delta.Y())\n\n\t\t// update animation\n\t\tswtch := enemy.R.(*render.Switch)\n\t\tif delta.X() > 0 {\n\t\t\tif swtch.Get() == \"left\" {\n\t\t\t\tswtch.Set(\"right\")\n\t\t\t}\n\t\t} else if delta.X() < 0 {\n\t\t\tif swtch.Get() == \"right\" {\n\t\t\t\tswtch.Set(\"left\")\n\t\t\t}\n\t\t}\n\t\treturn 0\n\t}, event.Enter)\n\n\tenemy.Bind(func(id int, _ interface{}) int {\n\t\tenemy := event.GetEntity(id).(*entities.Solid)\n\t\tenemy.Destroy()\n\t\treturn 0\n\t}, \"Destroy\")\n}\n\nfunc enemyPos() (float64, float64) {\n\t// Spawn on the edge of the screen\n\tperimeter := fieldWidth*2 + fieldHeight*2\n\tpos := int(rand.Float64() * float64(perimeter))\n\t// Top\n\tif pos < fieldWidth {\n\t\treturn float64(pos), 0\n\t}\n\tpos -= fieldWidth\n\t// Right\n\tif pos < fieldHeight {\n\t\treturn float64(fieldWidth), float64(pos)\n\t}\n\t// Bottom\n\tpos -= fieldHeight\n\tif pos < fieldWidth {\n\t\treturn float64(pos), float64(fieldHeight)\n\t}\n\tpos -= fieldWidth\n\t// Left\n\treturn 0, float64(pos)\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-plugin/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  \n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-plugin</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>GoLang plugin example</name>\n  <description>Example of minimalistic GoLang plugin.</description>\n\n  <properties>\n    <result.file.extension>so</result.file.extension>\n  </properties>\n      \n  <profiles>\n    <profile>\n      <id>build-for-windows</id>\n      <activation>\n        <os>\n          <family>windows</family>\n        </os>\n      </activation>\n      <properties>\n        <result.file.extension>dll</result.file.extension>\n      </properties>\n    </profile>\n  </profiles>\n  \n  <build>\n    <finalName>go_plugin.${result.file.extension}</finalName>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-build</id>\n            <configuration>\n              <buildMode>plugin</buildMode>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-plugin/src/arithplugin.go",
    "content": "package main\n\nfunc Add(x, y int) int {\n\treturn x + y\n}\n\nfunc Sub(x, y int) int {\n\treturn x - y\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-plugin/src/arithplugin_test.go",
    "content": "package main\n\nimport (\n\t\"testing\"\n)\n\nfunc TestAdd(t *testing.T) {\n\tif Add(4, 7) != 11 {\n\t\tt.Fatalf(\"Wrong Add result\")\n\t}\n}\n\nfunc TestSub(t *testing.T) {\n\tif Sub(4, 7) != -3 {\n\t\tt.Fatalf(\"Wrong Sub result\")\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-preprocessing/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-preprocessing</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>Example of preprocessing</name>\n  <description>Example of Java Comment Preprocessor with GoLang.</description>\n\n  <properties>\n    <src.preprocessed>${project.build.directory}${file.separator}.preprocessed_src</src.preprocessed>\n  </properties>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>org.codehaus.mojo</groupId>\n        <artifactId>buildnumber-maven-plugin</artifactId>\n        <version>1.4</version>\n        <executions>\n          <execution>\n            <id>generateTimestampForBuild</id>\n            <phase>validate</phase>\n            <goals>\n              <goal>create-timestamp</goal>\n            </goals>\n            <configuration>\n              <timestampFormat>yyMMddHHmmss</timestampFormat>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-clean-plugin</artifactId>\n        <version>3.0.0</version>\n        <configuration>\n          <followSymLinks>false</followSymLinks>\n          <excludeDefaultDirectories>true</excludeDefaultDirectories>\n          <filesets>\n            <fileset>\n              <directory>${src.preprocessed}</directory>\n            </fileset>\n          </filesets>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <sources>${src.preprocessed}</sources>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-fix</id>\n            <phase>initialize</phase>\n          </execution>\n          <execution>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>jcp</artifactId>\n        <version>7.0.5</version>\n        <executions>\n          <execution>\n            <id>preprocessGoSources</id>\n            <phase>validate</phase>\n            <goals>\n              <goal>preprocess</goal>\n            </goals>\n          </execution>\n        </executions>\n        <configuration>\n          <extensions>\n             <ext>go</ext>\n          </extensions> \n          <excludeExtensions>\n             <ext>txt</ext>\n             <ext>png</ext>\n          </excludeExtensions>\n          <keepLines>false</keepLines>\n          <clear>true</clear>\n          <target>${src.preprocessed}</target>\n          <vars>\n            <timeStamp>${timestamp}</timeStamp>\n            <txtMsg>Iteration number is </txtMsg>\n          </vars>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-preprocessing/src/inlined.go",
    "content": "//#excludeif true\n//#-\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"image/png\"\n\t\"log\"\n)\n\nfunc main() {\n\t//#+\n\tvar imageArray = []uint8{/*$binfile(\"./image.png\",\"uint8[]s\")$*/}\n\tvar imageConfig, errDecode = png.DecodeConfig(bytes.NewBuffer(imageArray))\n\tif errDecode != nil {\n\t\tlog.Fatal(errDecode)\n\t}\n\n\tfmt.Printf(\"Embedded image has size %dx%d\\n\", imageConfig.Width, imageConfig.Height)\n\n\t//#local text=str2java(evalfile(\"./text.txt\"),false)\n\tfmt.Println( /*$\"\\\"\"+text+\"\\\"\"$*/ )\n\t//#-\n}\n\n//#+\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-preprocessing/src/main.go",
    "content": "package main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"image/png\"\n\t\"log\"\n)\n\nfunc main() {\n\tfmt.Printf(\"Example of preprocessing GoLang sources with Java Comment Preprocessor\\n\")\n\tfmt.Printf(\"Project version is : /*$mvn.project.version$*/\\n\")\n\tfmt.Printf(\"Build timestamp is : /*$timeStamp$*/\\n\\n\")\n\t//#local counter=1\n\t//#while counter<=10\n\tfmt.Println(\"/*$txtMsg$*/ /*$counter$*/\")\n\t//#local counter=counter+1\n\t//#end\n\t//#include \"./inlined.go\"\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-preprocessing/src/text.txt",
    "content": "The Text is defined in\nexternal text UTF8 resource file!\nОн содержит и странные русские буквы (для непосвященных) и даже Ё!"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-primitive/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-primitive</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>Primitive converting utility</name>\n  <description>Example of mvn-golang-wrapper usage to build the Primitive project: https://github.com/fogleman/primitive</description>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <executions>\n          <execution>\n            <id>default-get</id>\n            <configuration>\n              <buildFlags>\n                <flag>-u</flag>\n              </buildFlags>\n              <packages>\n                <package>github.com/fogleman/primitive</package>\n              </packages>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-build</id>\n            <configuration>\n              <packages>\n                <package>github.com/fogleman/primitive</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n    \n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-protobuf/go-dependencies.lst",
    "content": "package:github.com/golang/protobuf/proto"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-protobuf/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-protobuf</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>Protobuf with Golang example</name>\n  <description>Example of compilation and use of protobuf script.</description>\n\n  <properties>\n    <proto.gen.folder>${project.build.directory}${file.separator}.protoGen</proto.gen.folder>\n    <os.extension></os.extension>\n  </properties>\n\n  <profiles>\n    <profile>\n      <id>win-profile</id>\n      <activation>\n        <os>\n          <family>windows</family>\n        </os>\n      </activation>\n      <properties>\n        <os.extension>.exe</os.extension>\n      </properties>\n    </profile>\n  </profiles>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n          <addToGoPath>\n            <dir>${proto.gen.folder}</dir>\n          </addToGoPath>\n        </configuration>\n        <executions>\n          <execution>\n            <id>get-protoc-get-go</id>\n            <phase>generate-sources</phase>\n            <goals>\n              <goal>get</goal>\n            </goals>\n            <configuration>\n              <buildFlags>\n                <flag>-u</flag>\n              </buildFlags>\n              <packages>\n                <package>github.com/golang/protobuf/protoc-gen-go</package>\n              </packages>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-get</id>\n            <configuration>\n              <externalPackageFile>${basedir}${file.separator}go-dependencies.lst</externalPackageFile>\n            </configuration>\n          </execution>\n          <execution>\n            <id>do-run</id>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>com.github.os72</groupId>\n        <artifactId>protoc-jar-maven-plugin</artifactId>\n        <version>3.11.4</version>\n        <executions>\n          <execution>\n            <id>generate-go-from-proto</id>\n            <phase>generate-sources</phase>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <type>go</type>\n              <pluginPath>${project.build.directory}${file.separator}protoc-gen-go${os.extension}</pluginPath>\n              <inputDirectories>\n                <dir>${basedir}${file.separator}proto</dir>\n              </inputDirectories>\n              <outputDirectory>${proto.gen.folder}${file.separator}src${file.separator}protoexample</outputDirectory>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-protobuf/proto/person.proto",
    "content": "syntax=\"proto3\";\n\npackage protoexample;\noption go_package=\"github.com/raydac\";\n\nmessage Person {\n      string name = 1;\n      int32 age = 2;\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-protobuf/src/main.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/golang/protobuf/proto\"\n\t\"log\"\n\tprotoexample \"protoexample/github.com/raydac\"\n)\n\nfunc main() {\n\n\telliot := &protoexample.Person{\n\t\tName: \"Elliot\",\n\t\tAge:  24,\n\t}\n\n\tdata, err := proto.Marshal(elliot)\n\tif err != nil {\n\t\tlog.Fatal(\"marshaling error: \", err)\n\t}\n\n\t// printing out our raw protobuf object\n\tfmt.Println(data)\n\n\t// let's go the other way and unmarshal\n\t// our byte array into an object we can modify\n\t// and use\n\tnewElliot := &protoexample.Person{}\n\terr = proto.Unmarshal(data, newElliot)\n\tif err != nil {\n\t\tlog.Fatal(\"unmarshaling error: \", err)\n\t}\n\n\t// print out our `newElliot` object\n\t// for good measure\n\tfmt.Println(newElliot.GetAge())\n\tfmt.Println(newElliot.GetName())\n\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-termboxgo/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n      <groupId>com.igormaznitsa</groupId>\n      <artifactId>mvn-golang-examples</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>mvn-golang-example-termboxgo</artifactId>\n    <packaging>mvn-golang</packaging>\n\n    <name>TERMBOX-GO example</name>\n    <description>Example of TERMBOX-GO https://github.com/nsf/termbox-go</description>\n\n    <build>\n      <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n      <directory>${basedir}${file.separator}bin</directory>\n      <plugins>\n        <plugin>\n          <groupId>com.igormaznitsa</groupId>\n          <artifactId>mvn-golang-wrapper</artifactId>\n          <version>${main-project-version}</version>\n          <extensions>true</extensions>\n          <configuration>\n            <goVersion>${go.sdk.version}</goVersion>\n            <env>\n              <GO111MODULE>auto</GO111MODULE>\n            </env>\n          </configuration>\n          <executions>\n            <execution>\n              <id>default-get</id>\n              <configuration>\n                <packages>\n                  <package>github.com/nsf/termbox-go</package>\n                </packages>\n              </configuration>\n            </execution>\n          </executions>\n        </plugin>\n      </plugins>\n    </build>\n    \n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-termboxgo/src/main.go",
    "content": "package main\n\nimport \"github.com/nsf/termbox-go\"\nimport \"fmt\"\n\ntype key struct {\n\tx  int\n\ty  int\n\tch rune\n}\n\nvar K_ESC = []key{{1, 1, 'E'}, {2, 1, 'S'}, {3, 1, 'C'}}\nvar K_F1 = []key{{6, 1, 'F'}, {7, 1, '1'}}\nvar K_F2 = []key{{9, 1, 'F'}, {10, 1, '2'}}\nvar K_F3 = []key{{12, 1, 'F'}, {13, 1, '3'}}\nvar K_F4 = []key{{15, 1, 'F'}, {16, 1, '4'}}\nvar K_F5 = []key{{19, 1, 'F'}, {20, 1, '5'}}\nvar K_F6 = []key{{22, 1, 'F'}, {23, 1, '6'}}\nvar K_F7 = []key{{25, 1, 'F'}, {26, 1, '7'}}\nvar K_F8 = []key{{28, 1, 'F'}, {29, 1, '8'}}\nvar K_F9 = []key{{33, 1, 'F'}, {34, 1, '9'}}\nvar K_F10 = []key{{36, 1, 'F'}, {37, 1, '1'}, {38, 1, '0'}}\nvar K_F11 = []key{{40, 1, 'F'}, {41, 1, '1'}, {42, 1, '1'}}\nvar K_F12 = []key{{44, 1, 'F'}, {45, 1, '1'}, {46, 1, '2'}}\nvar K_PRN = []key{{50, 1, 'P'}, {51, 1, 'R'}, {52, 1, 'N'}}\nvar K_SCR = []key{{54, 1, 'S'}, {55, 1, 'C'}, {56, 1, 'R'}}\nvar K_BRK = []key{{58, 1, 'B'}, {59, 1, 'R'}, {60, 1, 'K'}}\nvar K_LED1 = []key{{66, 1, '-'}}\nvar K_LED2 = []key{{70, 1, '-'}}\nvar K_LED3 = []key{{74, 1, '-'}}\nvar K_TILDE = []key{{1, 4, '`'}}\nvar K_TILDE_SHIFT = []key{{1, 4, '~'}}\nvar K_1 = []key{{4, 4, '1'}}\nvar K_1_SHIFT = []key{{4, 4, '!'}}\nvar K_2 = []key{{7, 4, '2'}}\nvar K_2_SHIFT = []key{{7, 4, '@'}}\nvar K_3 = []key{{10, 4, '3'}}\nvar K_3_SHIFT = []key{{10, 4, '#'}}\nvar K_4 = []key{{13, 4, '4'}}\nvar K_4_SHIFT = []key{{13, 4, '$'}}\nvar K_5 = []key{{16, 4, '5'}}\nvar K_5_SHIFT = []key{{16, 4, '%'}}\nvar K_6 = []key{{19, 4, '6'}}\nvar K_6_SHIFT = []key{{19, 4, '^'}}\nvar K_7 = []key{{22, 4, '7'}}\nvar K_7_SHIFT = []key{{22, 4, '&'}}\nvar K_8 = []key{{25, 4, '8'}}\nvar K_8_SHIFT = []key{{25, 4, '*'}}\nvar K_9 = []key{{28, 4, '9'}}\nvar K_9_SHIFT = []key{{28, 4, '('}}\nvar K_0 = []key{{31, 4, '0'}}\nvar K_0_SHIFT = []key{{31, 4, ')'}}\nvar K_MINUS = []key{{34, 4, '-'}}\nvar K_MINUS_SHIFT = []key{{34, 4, '_'}}\nvar K_EQUALS = []key{{37, 4, '='}}\nvar K_EQUALS_SHIFT = []key{{37, 4, '+'}}\nvar K_BACKSLASH = []key{{40, 4, '\\\\'}}\nvar K_BACKSLASH_SHIFT = []key{{40, 4, '|'}}\nvar K_BACKSPACE = []key{{44, 4, 0x2190}, {45, 4, 0x2500}, {46, 4, 0x2500}}\nvar K_INS = []key{{50, 4, 'I'}, {51, 4, 'N'}, {52, 4, 'S'}}\nvar K_HOM = []key{{54, 4, 'H'}, {55, 4, 'O'}, {56, 4, 'M'}}\nvar K_PGU = []key{{58, 4, 'P'}, {59, 4, 'G'}, {60, 4, 'U'}}\nvar K_K_NUMLOCK = []key{{65, 4, 'N'}}\nvar K_K_SLASH = []key{{68, 4, '/'}}\nvar K_K_STAR = []key{{71, 4, '*'}}\nvar K_K_MINUS = []key{{74, 4, '-'}}\nvar K_TAB = []key{{1, 6, 'T'}, {2, 6, 'A'}, {3, 6, 'B'}}\nvar K_q = []key{{6, 6, 'q'}}\nvar K_Q = []key{{6, 6, 'Q'}}\nvar K_w = []key{{9, 6, 'w'}}\nvar K_W = []key{{9, 6, 'W'}}\nvar K_e = []key{{12, 6, 'e'}}\nvar K_E = []key{{12, 6, 'E'}}\nvar K_r = []key{{15, 6, 'r'}}\nvar K_R = []key{{15, 6, 'R'}}\nvar K_t = []key{{18, 6, 't'}}\nvar K_T = []key{{18, 6, 'T'}}\nvar K_y = []key{{21, 6, 'y'}}\nvar K_Y = []key{{21, 6, 'Y'}}\nvar K_u = []key{{24, 6, 'u'}}\nvar K_U = []key{{24, 6, 'U'}}\nvar K_i = []key{{27, 6, 'i'}}\nvar K_I = []key{{27, 6, 'I'}}\nvar K_o = []key{{30, 6, 'o'}}\nvar K_O = []key{{30, 6, 'O'}}\nvar K_p = []key{{33, 6, 'p'}}\nvar K_P = []key{{33, 6, 'P'}}\nvar K_LSQB = []key{{36, 6, '['}}\nvar K_LCUB = []key{{36, 6, '{'}}\nvar K_RSQB = []key{{39, 6, ']'}}\nvar K_RCUB = []key{{39, 6, '}'}}\nvar K_ENTER = []key{\n\t{43, 6, 0x2591}, {44, 6, 0x2591}, {45, 6, 0x2591}, {46, 6, 0x2591},\n\t{43, 7, 0x2591}, {44, 7, 0x2591}, {45, 7, 0x21B5}, {46, 7, 0x2591},\n\t{41, 8, 0x2591}, {42, 8, 0x2591}, {43, 8, 0x2591}, {44, 8, 0x2591},\n\t{45, 8, 0x2591}, {46, 8, 0x2591},\n}\nvar K_DEL = []key{{50, 6, 'D'}, {51, 6, 'E'}, {52, 6, 'L'}}\nvar K_END = []key{{54, 6, 'E'}, {55, 6, 'N'}, {56, 6, 'D'}}\nvar K_PGD = []key{{58, 6, 'P'}, {59, 6, 'G'}, {60, 6, 'D'}}\nvar K_K_7 = []key{{65, 6, '7'}}\nvar K_K_8 = []key{{68, 6, '8'}}\nvar K_K_9 = []key{{71, 6, '9'}}\nvar K_K_PLUS = []key{{74, 6, ' '}, {74, 7, '+'}, {74, 8, ' '}}\nvar K_CAPS = []key{{1, 8, 'C'}, {2, 8, 'A'}, {3, 8, 'P'}, {4, 8, 'S'}}\nvar K_a = []key{{7, 8, 'a'}}\nvar K_A = []key{{7, 8, 'A'}}\nvar K_s = []key{{10, 8, 's'}}\nvar K_S = []key{{10, 8, 'S'}}\nvar K_d = []key{{13, 8, 'd'}}\nvar K_D = []key{{13, 8, 'D'}}\nvar K_f = []key{{16, 8, 'f'}}\nvar K_F = []key{{16, 8, 'F'}}\nvar K_g = []key{{19, 8, 'g'}}\nvar K_G = []key{{19, 8, 'G'}}\nvar K_h = []key{{22, 8, 'h'}}\nvar K_H = []key{{22, 8, 'H'}}\nvar K_j = []key{{25, 8, 'j'}}\nvar K_J = []key{{25, 8, 'J'}}\nvar K_k = []key{{28, 8, 'k'}}\nvar K_K = []key{{28, 8, 'K'}}\nvar K_l = []key{{31, 8, 'l'}}\nvar K_L = []key{{31, 8, 'L'}}\nvar K_SEMICOLON = []key{{34, 8, ';'}}\nvar K_PARENTHESIS = []key{{34, 8, ':'}}\nvar K_QUOTE = []key{{37, 8, '\\''}}\nvar K_DOUBLEQUOTE = []key{{37, 8, '\"'}}\nvar K_K_4 = []key{{65, 8, '4'}}\nvar K_K_5 = []key{{68, 8, '5'}}\nvar K_K_6 = []key{{71, 8, '6'}}\nvar K_LSHIFT = []key{{1, 10, 'S'}, {2, 10, 'H'}, {3, 10, 'I'}, {4, 10, 'F'}, {5, 10, 'T'}}\nvar K_z = []key{{9, 10, 'z'}}\nvar K_Z = []key{{9, 10, 'Z'}}\nvar K_x = []key{{12, 10, 'x'}}\nvar K_X = []key{{12, 10, 'X'}}\nvar K_c = []key{{15, 10, 'c'}}\nvar K_C = []key{{15, 10, 'C'}}\nvar K_v = []key{{18, 10, 'v'}}\nvar K_V = []key{{18, 10, 'V'}}\nvar K_b = []key{{21, 10, 'b'}}\nvar K_B = []key{{21, 10, 'B'}}\nvar K_n = []key{{24, 10, 'n'}}\nvar K_N = []key{{24, 10, 'N'}}\nvar K_m = []key{{27, 10, 'm'}}\nvar K_M = []key{{27, 10, 'M'}}\nvar K_COMMA = []key{{30, 10, ','}}\nvar K_LANB = []key{{30, 10, '<'}}\nvar K_PERIOD = []key{{33, 10, '.'}}\nvar K_RANB = []key{{33, 10, '>'}}\nvar K_SLASH = []key{{36, 10, '/'}}\nvar K_QUESTION = []key{{36, 10, '?'}}\nvar K_RSHIFT = []key{{42, 10, 'S'}, {43, 10, 'H'}, {44, 10, 'I'}, {45, 10, 'F'}, {46, 10, 'T'}}\nvar K_ARROW_UP = []key{{54, 10, '('}, {55, 10, 0x2191}, {56, 10, ')'}}\nvar K_K_1 = []key{{65, 10, '1'}}\nvar K_K_2 = []key{{68, 10, '2'}}\nvar K_K_3 = []key{{71, 10, '3'}}\nvar K_K_ENTER = []key{{74, 10, 0x2591}, {74, 11, 0x2591}, {74, 12, 0x2591}}\nvar K_LCTRL = []key{{1, 12, 'C'}, {2, 12, 'T'}, {3, 12, 'R'}, {4, 12, 'L'}}\nvar K_LWIN = []key{{6, 12, 'W'}, {7, 12, 'I'}, {8, 12, 'N'}}\nvar K_LALT = []key{{10, 12, 'A'}, {11, 12, 'L'}, {12, 12, 'T'}}\nvar K_SPACE = []key{\n\t{14, 12, ' '}, {15, 12, ' '}, {16, 12, ' '}, {17, 12, ' '}, {18, 12, ' '},\n\t{19, 12, 'S'}, {20, 12, 'P'}, {21, 12, 'A'}, {22, 12, 'C'}, {23, 12, 'E'},\n\t{24, 12, ' '}, {25, 12, ' '}, {26, 12, ' '}, {27, 12, ' '}, {28, 12, ' '},\n}\nvar K_RALT = []key{{30, 12, 'A'}, {31, 12, 'L'}, {32, 12, 'T'}}\nvar K_RWIN = []key{{34, 12, 'W'}, {35, 12, 'I'}, {36, 12, 'N'}}\nvar K_RPROP = []key{{38, 12, 'P'}, {39, 12, 'R'}, {40, 12, 'O'}, {41, 12, 'P'}}\nvar K_RCTRL = []key{{43, 12, 'C'}, {44, 12, 'T'}, {45, 12, 'R'}, {46, 12, 'L'}}\nvar K_ARROW_LEFT = []key{{50, 12, '('}, {51, 12, 0x2190}, {52, 12, ')'}}\nvar K_ARROW_DOWN = []key{{54, 12, '('}, {55, 12, 0x2193}, {56, 12, ')'}}\nvar K_ARROW_RIGHT = []key{{58, 12, '('}, {59, 12, 0x2192}, {60, 12, ')'}}\nvar K_K_0 = []key{{65, 12, ' '}, {66, 12, '0'}, {67, 12, ' '}, {68, 12, ' '}}\nvar K_K_PERIOD = []key{{71, 12, '.'}}\n\ntype combo struct {\n\tkeys [][]key\n}\n\nvar combos = []combo{\n\t{[][]key{K_TILDE, K_2, K_SPACE, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_A, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_B, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_C, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_D, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_E, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_F, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_G, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_H, K_BACKSPACE, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_I, K_TAB, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_J, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_K, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_L, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_M, K_ENTER, K_K_ENTER, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_N, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_O, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_P, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_Q, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_R, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_S, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_T, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_U, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_V, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_W, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_X, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_Y, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_Z, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_LSQB, K_ESC, K_3, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_4, K_BACKSLASH, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_RSQB, K_5, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_6, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_7, K_SLASH, K_MINUS_SHIFT, K_LCTRL, K_RCTRL}},\n\t{[][]key{K_SPACE}},\n\t{[][]key{K_1_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_DOUBLEQUOTE, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_3_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_4_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_5_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_7_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_QUOTE}},\n\t{[][]key{K_9_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_0_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_8_SHIFT, K_K_STAR, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_EQUALS_SHIFT, K_K_PLUS, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_COMMA}},\n\t{[][]key{K_MINUS, K_K_MINUS}},\n\t{[][]key{K_PERIOD, K_K_PERIOD}},\n\t{[][]key{K_SLASH, K_K_SLASH}},\n\t{[][]key{K_0, K_K_0}},\n\t{[][]key{K_1, K_K_1}},\n\t{[][]key{K_2, K_K_2}},\n\t{[][]key{K_3, K_K_3}},\n\t{[][]key{K_4, K_K_4}},\n\t{[][]key{K_5, K_K_5}},\n\t{[][]key{K_6, K_K_6}},\n\t{[][]key{K_7, K_K_7}},\n\t{[][]key{K_8, K_K_8}},\n\t{[][]key{K_9, K_K_9}},\n\t{[][]key{K_PARENTHESIS, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_SEMICOLON}},\n\t{[][]key{K_LANB, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_EQUALS}},\n\t{[][]key{K_RANB, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_QUESTION, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_2_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_A, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_B, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_C, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_D, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_E, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_F, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_G, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_H, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_I, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_J, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_K, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_L, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_M, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_N, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_O, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_P, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_Q, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_R, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_S, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_T, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_U, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_V, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_W, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_X, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_Y, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_Z, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_LSQB}},\n\t{[][]key{K_BACKSLASH}},\n\t{[][]key{K_RSQB}},\n\t{[][]key{K_6_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_MINUS_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_TILDE}},\n\t{[][]key{K_a}},\n\t{[][]key{K_b}},\n\t{[][]key{K_c}},\n\t{[][]key{K_d}},\n\t{[][]key{K_e}},\n\t{[][]key{K_f}},\n\t{[][]key{K_g}},\n\t{[][]key{K_h}},\n\t{[][]key{K_i}},\n\t{[][]key{K_j}},\n\t{[][]key{K_k}},\n\t{[][]key{K_l}},\n\t{[][]key{K_m}},\n\t{[][]key{K_n}},\n\t{[][]key{K_o}},\n\t{[][]key{K_p}},\n\t{[][]key{K_q}},\n\t{[][]key{K_r}},\n\t{[][]key{K_s}},\n\t{[][]key{K_t}},\n\t{[][]key{K_u}},\n\t{[][]key{K_v}},\n\t{[][]key{K_w}},\n\t{[][]key{K_x}},\n\t{[][]key{K_y}},\n\t{[][]key{K_z}},\n\t{[][]key{K_LCUB, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_BACKSLASH_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_RCUB, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_TILDE_SHIFT, K_LSHIFT, K_RSHIFT}},\n\t{[][]key{K_8, K_BACKSPACE, K_LCTRL, K_RCTRL}},\n}\n\nvar func_combos = []combo{\n\t{[][]key{K_F1}},\n\t{[][]key{K_F2}},\n\t{[][]key{K_F3}},\n\t{[][]key{K_F4}},\n\t{[][]key{K_F5}},\n\t{[][]key{K_F6}},\n\t{[][]key{K_F7}},\n\t{[][]key{K_F8}},\n\t{[][]key{K_F9}},\n\t{[][]key{K_F10}},\n\t{[][]key{K_F11}},\n\t{[][]key{K_F12}},\n\t{[][]key{K_INS}},\n\t{[][]key{K_DEL}},\n\t{[][]key{K_HOM}},\n\t{[][]key{K_END}},\n\t{[][]key{K_PGU}},\n\t{[][]key{K_PGD}},\n\t{[][]key{K_ARROW_UP}},\n\t{[][]key{K_ARROW_DOWN}},\n\t{[][]key{K_ARROW_LEFT}},\n\t{[][]key{K_ARROW_RIGHT}},\n}\n\nfunc print_tb(x, y int, fg, bg termbox.Attribute, msg string) {\n\tfor _, c := range msg {\n\t\ttermbox.SetCell(x, y, c, fg, bg)\n\t\tx++\n\t}\n}\n\nfunc printf_tb(x, y int, fg, bg termbox.Attribute, format string, args ...interface{}) {\n\ts := fmt.Sprintf(format, args...)\n\tprint_tb(x, y, fg, bg, s)\n}\n\nfunc draw_key(k []key, fg, bg termbox.Attribute) {\n\tfor _, k := range k {\n\t\ttermbox.SetCell(k.x+2, k.y+4, k.ch, fg, bg)\n\t}\n}\n\nfunc draw_keyboard() {\n\ttermbox.SetCell(0, 0, 0x250C, termbox.ColorWhite, termbox.ColorBlack)\n\ttermbox.SetCell(79, 0, 0x2510, termbox.ColorWhite, termbox.ColorBlack)\n\ttermbox.SetCell(0, 23, 0x2514, termbox.ColorWhite, termbox.ColorBlack)\n\ttermbox.SetCell(79, 23, 0x2518, termbox.ColorWhite, termbox.ColorBlack)\n\n\tfor i := 1; i < 79; i++ {\n\t\ttermbox.SetCell(i, 0, 0x2500, termbox.ColorWhite, termbox.ColorBlack)\n\t\ttermbox.SetCell(i, 23, 0x2500, termbox.ColorWhite, termbox.ColorBlack)\n\t\ttermbox.SetCell(i, 17, 0x2500, termbox.ColorWhite, termbox.ColorBlack)\n\t\ttermbox.SetCell(i, 4, 0x2500, termbox.ColorWhite, termbox.ColorBlack)\n\t}\n\tfor i := 1; i < 23; i++ {\n\t\ttermbox.SetCell(0, i, 0x2502, termbox.ColorWhite, termbox.ColorBlack)\n\t\ttermbox.SetCell(79, i, 0x2502, termbox.ColorWhite, termbox.ColorBlack)\n\t}\n\ttermbox.SetCell(0, 17, 0x251C, termbox.ColorWhite, termbox.ColorBlack)\n\ttermbox.SetCell(79, 17, 0x2524, termbox.ColorWhite, termbox.ColorBlack)\n\ttermbox.SetCell(0, 4, 0x251C, termbox.ColorWhite, termbox.ColorBlack)\n\ttermbox.SetCell(79, 4, 0x2524, termbox.ColorWhite, termbox.ColorBlack)\n\tfor i := 5; i < 17; i++ {\n\t\ttermbox.SetCell(1, i, 0x2588, termbox.ColorYellow, termbox.ColorYellow)\n\t\ttermbox.SetCell(78, i, 0x2588, termbox.ColorYellow, termbox.ColorYellow)\n\t}\n\n\tdraw_key(K_ESC, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F1, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F2, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F3, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F4, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F5, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F6, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F7, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F8, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F9, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F10, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F11, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_F12, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_PRN, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_SCR, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_BRK, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_LED1, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_LED2, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_LED3, termbox.ColorWhite, termbox.ColorBlue)\n\n\tdraw_key(K_TILDE, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_1, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_2, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_3, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_4, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_5, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_6, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_7, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_8, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_9, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_0, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_MINUS, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_EQUALS, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_BACKSLASH, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_BACKSPACE, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_INS, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_HOM, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_PGU, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_NUMLOCK, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_SLASH, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_STAR, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_MINUS, termbox.ColorWhite, termbox.ColorBlue)\n\n\tdraw_key(K_TAB, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_q, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_w, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_e, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_r, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_t, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_y, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_u, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_i, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_o, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_p, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_LSQB, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_RSQB, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_ENTER, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_DEL, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_END, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_PGD, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_7, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_8, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_9, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_PLUS, termbox.ColorWhite, termbox.ColorBlue)\n\n\tdraw_key(K_CAPS, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_a, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_s, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_d, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_f, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_g, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_h, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_j, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_k, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_l, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_SEMICOLON, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_QUOTE, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_4, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_5, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_6, termbox.ColorWhite, termbox.ColorBlue)\n\n\tdraw_key(K_LSHIFT, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_z, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_x, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_c, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_v, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_b, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_n, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_m, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_COMMA, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_PERIOD, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_SLASH, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_RSHIFT, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_ARROW_UP, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_1, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_2, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_3, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_ENTER, termbox.ColorWhite, termbox.ColorBlue)\n\n\tdraw_key(K_LCTRL, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_LWIN, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_LALT, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_SPACE, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_RCTRL, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_RPROP, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_RWIN, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_RALT, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_ARROW_LEFT, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_ARROW_DOWN, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_ARROW_RIGHT, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_0, termbox.ColorWhite, termbox.ColorBlue)\n\tdraw_key(K_K_PERIOD, termbox.ColorWhite, termbox.ColorBlue)\n\n\tprintf_tb(33, 1, termbox.ColorMagenta|termbox.AttrBold, termbox.ColorBlack, \"Keyboard demo!\")\n\tprintf_tb(21, 2, termbox.ColorMagenta, termbox.ColorBlack, \"(press CTRL+X and then CTRL+Q to exit)\")\n\tprintf_tb(15, 3, termbox.ColorMagenta, termbox.ColorBlack, \"(press CTRL+X and then CTRL+C to change input mode)\")\n\n\tinputmode := termbox.SetInputMode(termbox.InputCurrent)\n\tinputmode_str := \"\"\n\tswitch {\n\tcase inputmode&termbox.InputEsc != 0:\n\t\tinputmode_str = \"termbox.InputEsc\"\n\tcase inputmode&termbox.InputAlt != 0:\n\t\tinputmode_str = \"termbox.InputAlt\"\n\t}\n\n\tif inputmode&termbox.InputMouse != 0 {\n\t\tinputmode_str += \" | termbox.InputMouse\"\n\t}\n\tprintf_tb(3, 18, termbox.ColorWhite, termbox.ColorBlack, \"Input mode: %s\", inputmode_str)\n}\n\nvar fcmap = []string{\n\t\"CTRL+2, CTRL+~\",\n\t\"CTRL+A\",\n\t\"CTRL+B\",\n\t\"CTRL+C\",\n\t\"CTRL+D\",\n\t\"CTRL+E\",\n\t\"CTRL+F\",\n\t\"CTRL+G\",\n\t\"CTRL+H, BACKSPACE\",\n\t\"CTRL+I, TAB\",\n\t\"CTRL+J\",\n\t\"CTRL+K\",\n\t\"CTRL+L\",\n\t\"CTRL+M, ENTER\",\n\t\"CTRL+N\",\n\t\"CTRL+O\",\n\t\"CTRL+P\",\n\t\"CTRL+Q\",\n\t\"CTRL+R\",\n\t\"CTRL+S\",\n\t\"CTRL+T\",\n\t\"CTRL+U\",\n\t\"CTRL+V\",\n\t\"CTRL+W\",\n\t\"CTRL+X\",\n\t\"CTRL+Y\",\n\t\"CTRL+Z\",\n\t\"CTRL+3, ESC, CTRL+[\",\n\t\"CTRL+4, CTRL+\\\\\",\n\t\"CTRL+5, CTRL+]\",\n\t\"CTRL+6\",\n\t\"CTRL+7, CTRL+/, CTRL+_\",\n\t\"SPACE\",\n}\n\nvar fkmap = []string{\n\t\"F1\",\n\t\"F2\",\n\t\"F3\",\n\t\"F4\",\n\t\"F5\",\n\t\"F6\",\n\t\"F7\",\n\t\"F8\",\n\t\"F9\",\n\t\"F10\",\n\t\"F11\",\n\t\"F12\",\n\t\"INSERT\",\n\t\"DELETE\",\n\t\"HOME\",\n\t\"END\",\n\t\"PGUP\",\n\t\"PGDN\",\n\t\"ARROW UP\",\n\t\"ARROW DOWN\",\n\t\"ARROW LEFT\",\n\t\"ARROW RIGHT\",\n}\n\nfunc funckeymap(k termbox.Key) string {\n\tif k == termbox.KeyCtrl8 {\n\t\treturn \"CTRL+8, BACKSPACE 2\" /* 0x7F */\n\t} else if k >= termbox.KeyArrowRight && k <= 0xFFFF {\n\t\treturn fkmap[0xFFFF-k]\n\t} else if k <= termbox.KeySpace {\n\t\treturn fcmap[k]\n\t}\n\treturn \"UNKNOWN\"\n}\n\nfunc pretty_print_press(ev *termbox.Event) {\n\tprintf_tb(3, 19, termbox.ColorWhite, termbox.ColorBlack, \"Key: \")\n\tprintf_tb(8, 19, termbox.ColorYellow, termbox.ColorBlack, \"decimal: %d\", ev.Key)\n\tprintf_tb(8, 20, termbox.ColorGreen, termbox.ColorBlack, \"hex:     0x%X\", ev.Key)\n\tprintf_tb(8, 21, termbox.ColorCyan, termbox.ColorBlack, \"octal:   0%o\", ev.Key)\n\tprintf_tb(8, 22, termbox.ColorRed, termbox.ColorBlack, \"string:  %s\", funckeymap(ev.Key))\n\n\tprintf_tb(54, 19, termbox.ColorWhite, termbox.ColorBlack, \"Char: \")\n\tprintf_tb(60, 19, termbox.ColorYellow, termbox.ColorBlack, \"decimal: %d\", ev.Ch)\n\tprintf_tb(60, 20, termbox.ColorGreen, termbox.ColorBlack, \"hex:     0x%X\", ev.Ch)\n\tprintf_tb(60, 21, termbox.ColorCyan, termbox.ColorBlack, \"octal:   0%o\", ev.Ch)\n\tprintf_tb(60, 22, termbox.ColorRed, termbox.ColorBlack, \"string:  %s\", string(ev.Ch))\n\n\tmodifier := \"none\"\n\tif ev.Mod != 0 {\n\t\tmodifier = \"termbox.ModAlt\"\n\t}\n\tprintf_tb(54, 18, termbox.ColorWhite, termbox.ColorBlack, \"Modifier: %s\", modifier)\n}\n\nfunc pretty_print_resize(ev *termbox.Event) {\n\tprintf_tb(3, 19, termbox.ColorWhite, termbox.ColorBlack, \"Resize event: %d x %d\", ev.Width, ev.Height)\n}\n\nvar counter = 0\n\nfunc pretty_print_mouse(ev *termbox.Event) {\n\tprintf_tb(3, 19, termbox.ColorWhite, termbox.ColorBlack, \"Mouse event: %d x %d\", ev.MouseX, ev.MouseY)\n\tbutton := \"\"\n\tswitch ev.Key {\n\tcase termbox.MouseLeft:\n\t\tbutton = \"MouseLeft: %d\"\n\tcase termbox.MouseMiddle:\n\t\tbutton = \"MouseMiddle: %d\"\n\tcase termbox.MouseRight:\n\t\tbutton = \"MouseRight: %d\"\n\tcase termbox.MouseWheelUp:\n\t\tbutton = \"MouseWheelUp: %d\"\n\tcase termbox.MouseWheelDown:\n\t\tbutton = \"MouseWheelDown: %d\"\n\tcase termbox.MouseRelease:\n\t\tbutton = \"MouseRelease: %d\"\n\t}\n\tif ev.Mod&termbox.ModMotion != 0 {\n\t\tbutton += \"*\"\n\t}\n\tcounter++\n\tprintf_tb(43, 19, termbox.ColorWhite, termbox.ColorBlack, \"Key: \")\n\tprintf_tb(48, 19, termbox.ColorYellow, termbox.ColorBlack, button, counter)\n}\n\nfunc dispatch_press(ev *termbox.Event) {\n\tif ev.Mod&termbox.ModAlt != 0 {\n\t\tdraw_key(K_LALT, termbox.ColorWhite, termbox.ColorRed)\n\t\tdraw_key(K_RALT, termbox.ColorWhite, termbox.ColorRed)\n\t}\n\n\tvar k *combo\n\tif ev.Key >= termbox.KeyArrowRight {\n\t\tk = &func_combos[0xFFFF-ev.Key]\n\t} else if ev.Ch < 128 {\n\t\tif ev.Ch == 0 && ev.Key < 128 {\n\t\t\tk = &combos[ev.Key]\n\t\t} else {\n\t\t\tk = &combos[ev.Ch]\n\t\t}\n\t}\n\tif k == nil {\n\t\treturn\n\t}\n\n\tkeys := k.keys\n\tfor _, k := range keys {\n\t\tdraw_key(k, termbox.ColorWhite, termbox.ColorRed)\n\t}\n}\n\nfunc main() {\n\terr := termbox.Init()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer termbox.Close()\n\n\ttermbox.SetInputMode(termbox.InputEsc | termbox.InputMouse)\n\n\ttermbox.Clear(termbox.ColorDefault, termbox.ColorDefault)\n\tdraw_keyboard()\n\ttermbox.Flush()\n\tinputmode := 0\n\tctrlxpressed := false\nloop:\n\tfor {\n\t\tswitch ev := termbox.PollEvent(); ev.Type {\n\t\tcase termbox.EventKey:\n\t\t\tif ev.Key == termbox.KeyCtrlS && ctrlxpressed {\n\t\t\t\ttermbox.Sync()\n\t\t\t}\n\t\t\tif ev.Key == termbox.KeyCtrlQ && ctrlxpressed {\n\t\t\t\tbreak loop\n\t\t\t}\n\t\t\tif ev.Key == termbox.KeyCtrlC && ctrlxpressed {\n\t\t\t\tchmap := []termbox.InputMode{\n\t\t\t\t\ttermbox.InputEsc | termbox.InputMouse,\n\t\t\t\t\ttermbox.InputAlt | termbox.InputMouse,\n\t\t\t\t\ttermbox.InputEsc,\n\t\t\t\t\ttermbox.InputAlt,\n\t\t\t\t}\n\t\t\t\tinputmode++\n\t\t\t\tif inputmode >= len(chmap) {\n\t\t\t\t\tinputmode = 0\n\t\t\t\t}\n\t\t\t\ttermbox.SetInputMode(chmap[inputmode])\n\t\t\t}\n\t\t\tif ev.Key == termbox.KeyCtrlX {\n\t\t\t\tctrlxpressed = true\n\t\t\t} else {\n\t\t\t\tctrlxpressed = false\n\t\t\t}\n\n\t\t\ttermbox.Clear(termbox.ColorDefault, termbox.ColorDefault)\n\t\t\tdraw_keyboard()\n\t\t\tdispatch_press(&ev)\n\t\t\tpretty_print_press(&ev)\n\t\t\ttermbox.Flush()\n\t\tcase termbox.EventResize:\n\t\t\ttermbox.Clear(termbox.ColorDefault, termbox.ColorDefault)\n\t\t\tdraw_keyboard()\n\t\t\tpretty_print_resize(&ev)\n\t\t\ttermbox.Flush()\n\t\tcase termbox.EventMouse:\n\t\t\ttermbox.Clear(termbox.ColorDefault, termbox.ColorDefault)\n\t\t\tdraw_keyboard()\n\t\t\tpretty_print_mouse(&ev)\n\t\t\ttermbox.Flush()\n\t\tcase termbox.EventError:\n\t\t\tpanic(ev.Err)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-termui/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-example-termui</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>TermUI example</name>\n  <description>Example of mvn-golang-wrapper usage to build a application with getting of some external dependency. It builds a sample from https://github.com/gizak/termui</description>\n\n  <properties>\n    <mvn.golang.go.version>${go.sdk.version}</mvn.golang.go.version>\n  </properties>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <moduleMode>true</moduleMode>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-termui/src/go.mod",
    "content": "module github.com/raydac/mvn-golang/examples/termui\n\nrequire github.com/gizak/termui/v3 v3.0.0\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-termui/src/go.sum",
    "content": "github.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd h1:XtfPmj9tQRilnrEmI1HjQhxXWRhEM+m8CACtaMJE/kM=\ngithub.com/cjbassi/drawille-go v0.0.0-20190126131713-27dc511fe6fd/go.mod h1:vjcQJUZJYD3MeVGhtZXSMnCHfUNZxsyYzJt90eCYxK4=\ngithub.com/gizak/termui/v3 v3.0.0 h1:NYTUG6ig/sJK05O5FyhWemwlVPO8ilNpvS/PgRtrKAE=\ngithub.com/gizak/termui/v3 v3.0.0/go.mod h1:uinu2dMdtMI+FTIdEFUJQT5y+KShnhQRshvPblXq3lY=\ngithub.com/mattn/go-runewidth v0.0.2 h1:UnlwIPBGaTZfPQ6T1IGzPI0EkYAQmT9fAEJ/poFC63o=\ngithub.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=\ngithub.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM=\ngithub.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=\ngithub.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840=\ngithub.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=\ngolang.org/x/arch v0.0.0-20181203225421-5a4828bb7045/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8=\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-termui/src/sparklines.go",
    "content": "// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved.\n// Use of this source code is governed by a MIT license that can\n// be found in the LICENSE file.\n\npackage main\n\nimport (\n\t\"log\"\n\n\tui \"github.com/gizak/termui/v3\"\n\t\"github.com/gizak/termui/v3/widgets\"\n)\n\nfunc main() {\n\tif err := ui.Init(); err != nil {\n\t\tlog.Fatalf(\"failed to initialize termui: %v\", err)\n\t}\n\tdefer ui.Close()\n\n\tdata := []float64{4, 2, 1, 6, 3, 9, 1, 4, 2, 15, 14, 9, 8, 6, 10, 13, 15, 12, 10, 5, 3, 6, 1, 7, 10, 10, 14, 13, 6}\n\n\tsl0 := widgets.NewSparkline()\n\tsl0.Data = data[3:]\n\tsl0.LineColor = ui.ColorGreen\n\n\t// single\n\tslg0 := widgets.NewSparklineGroup(sl0)\n\tslg0.Title = \"Sparkline 0\"\n\tslg0.SetRect(0, 0, 20, 10)\n\n\tsl1 := widgets.NewSparkline()\n\tsl1.Title = \"Sparkline 1\"\n\tsl1.Data = data\n\tsl1.LineColor = ui.ColorRed\n\n\tsl2 := widgets.NewSparkline()\n\tsl2.Title = \"Sparkline 2\"\n\tsl2.Data = data[5:]\n\tsl2.LineColor = ui.ColorMagenta\n\n\tslg1 := widgets.NewSparklineGroup(sl0, sl1, sl2)\n\tslg1.Title = \"Group Sparklines\"\n\tslg1.SetRect(0, 10, 25, 25)\n\n\tsl3 := widgets.NewSparkline()\n\tsl3.Title = \"Enlarged Sparkline\"\n\tsl3.Data = data\n\tsl3.LineColor = ui.ColorYellow\n\n\tslg2 := widgets.NewSparklineGroup(sl3)\n\tslg2.Title = \"Tweeked Sparkline\"\n\tslg2.SetRect(20, 0, 50, 10)\n\tslg2.BorderStyle.Fg = ui.ColorCyan\n\n\tui.Render(slg0, slg1, slg2)\n\n\tuiEvents := ui.PollEvents()\n\tfor {\n\t\te := <-uiEvents\n\t\tswitch e.ID {\n\t\tcase \"q\", \"<C-c>\":\n\t\t\treturn\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-testing/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  \n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang-examples</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <properties>\n    <xunit.report>${project.build.directory}${file.separator}reports${file.separator}xunit.xml</xunit.report>\n  </properties>\n\n  <artifactId>mvn-golang-example-testing</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <name>Example of Testing</name>\n  <description>Example of usage of mvn-golang-wrapper for testing Golang project and XUnit report producing.</description>\n  \n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <!-- Get all dependencies for test cases -->\n          <execution>\n            <id>getTestDependencies</id>\n            <goals>\n              <goal>get</goal>\n            </goals>\n            <configuration>\n              <buildFlags>\n                <flag>-t</flag>\n              </buildFlags>\n              <packages>\n                <package>./...</package>\n              </packages>\n            </configuration>\n          </execution>\n\n          <!-- Get xunit generator -->\n          <execution>\n            <id>default-get</id>\n            <configuration>\n              <packages>\n                <package>github.com/tebeka/go2xunit</package>\n              </packages>\n            </configuration>\n          </execution> \n\n          <!-- Check all tests with producing report file in Golang format -->\n          <execution>\n            <id>default-test</id>\n            <configuration>\n              <buildFlags>\n                <flag>-v</flag>\n              </buildFlags>\n              <outLogFile>test-out-verbose.log</outLogFile>\n              <ignoreErrorExitCode>true</ignoreErrorExitCode>\n            </configuration>\n          </execution>\n\n          <!-- Convert generated test report into xunit format and save as file -->\n          <execution>\n            <id>makeXUnitReport</id>\n            <phase>test</phase>\n            <goals>\n              <goal>custom</goal>\n            </goals>\n            <configuration>\n              <exec>go2xunit</exec>\n              <customCommand>-fail</customCommand>\n              <buildFlags>\n                <flag>-input</flag>\n                <flag>${project.build.directory}${file.separator}reports${file.separator}test-out-verbose.log</flag>\n                <flag>-output</flag>\n                <flag>${xunit.report}</flag>\n              </buildFlags>\n              <echo>\n                <info>XUnit report saved as ${xunit.report}</info>\n              </echo>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-testing/src/main.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\t\"mypackage/testexample\"\n)\n\nfunc main() {\n\tfmt.Printf(\"%s %d\\n\", testexample.GetString(), testexample.GetInt())\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-testing/src/mypackage/testexample/Some.go",
    "content": "package testexample\n\nfunc GetString() string {\n\treturn \"Hello String\"\n}\n\nfunc GetInt() int {\n\treturn 768\n}\n\nfunc MakeSumm(a, b int) int {\n\treturn a + b\n}\n"
  },
  {
    "path": "mvn-golang-examples/mvn-golang-example-testing/src/mypackage/testexample/Some_test.go",
    "content": "package testexample\n\nimport (\n\t\"github.com/stretchr/testify/assert\"\n\t\"testing\"\n)\n\nfunc TestGetString(t *testing.T) {\n\tassert.Equal(t, \"Hello String\", GetString())\n}\n\nfunc TestGetInt(t *testing.T) {\n\tassert.Equal(t, 768, GetInt())\n}\n\nfunc TestMakeSumm(t *testing.T) {\n\tassert.Equal(t, 7, MakeSumm(2, 5))\n}\n"
  },
  {
    "path": "mvn-golang-examples/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  \n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang</artifactId>\n    <version>2.3.11-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mvn-golang-examples</artifactId>\n  <packaging>pom</packaging>\n  <version>1.0.0-SNAPSHOT</version>\n\n  <properties>\n    <go.sdk.version>1.21.7</go.sdk.version>\n  </properties>\n\n  <profiles>\n    <profile>\n      <id>examples-under-unix</id>\n      <activation>\n        <os>\n          <family>unix</family>\n        </os>\n      </activation>\n      <modules>\n        <module>mvn-golang-example-nes</module>\n        <module>mvn-golang-example-gui</module>\n        <module>mvn-golang-example-primitive</module>\n        <module>mvn-golang-example-plugin</module>\n      </modules>\n    </profile>\n  </profiles>\n\n  <name>examples</name>\n  <description>Set of examples for mvn-golang-wrapper</description>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-clean-plugin</artifactId>\n        <version>3.0.0</version>\n        <configuration>\n          <followSymLinks>false</followSymLinks>\n          <excludeDefaultDirectories>true</excludeDefaultDirectories>\n          <filesets>\n            <fileset>\n              <directory>${basedir}${file.separator}pkg</directory>\n              <directory>${basedir}${file.separator}.jfrog</directory>\n            </fileset>\n          </filesets>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n  <modules>\n    <module>mvn-golang-example-gui-gwt</module>\n    <module>mvn-golang-example-preprocessing</module>\n    <module>mvn-golang-example-fyne</module>\n    <module>mvn-golang-example-helloworld</module>\n    <module>mvn-golang-example-helloworld-gomod</module>\n    <module>mvn-golang-example-helloworld-multisrc</module>\n    <module>mvn-golang-example-genbindata</module>\n    <module>mvn-golang-example-goexample</module>\n    <module>mvn-golang-example-termui</module>\n    <module>mvn-golang-example-logrus</module>\n    <module>mvn-golang-example-goterm</module>\n    <module>mvn-golang-example-multimodule</module>\n    <module>mvn-golang-example-testing</module>\n    <module>mvn-golang-example-gocui</module>\n    <module>mvn-golang-example-clui</module>\n    <module>mvn-golang-example-termboxgo</module>\n    <module>mvn-golang-example-maven-repository</module>\n    <module>mvn-golang-example-maven-module-mix</module>\n    <module>mvn-golang-example-protobuf</module>\n    <module>mvn-golang-example-azul3d-mandelbrot</module>\n    <module>mvn-golang-example-oak-shooter</module>\n    <module>test-git-cvs</module>\n  </modules>\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/cvs-git-branch-master/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>test-git-cvs</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>cvs-git-branch-master</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <description>Test of loading main branch</description>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>${project.groupId}</groupId>\n      <artifactId>cvs-git-revision</artifactId>\n      <version>${project.version}</version>\n      <type>mvn-golang</type>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <sources>${src.preprocessed}</sources>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-build</id>\n            <configuration>\n              <buildFlags>\n                <flag>-a</flag>\n              </buildFlags>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-fix</id>\n            <phase>initialize</phase>\n          </execution>\n          <execution>\n            <id>default-get</id>\n            <configuration>\n              <enforceDeletePackageFiles>true</enforceDeletePackageFiles>\n              <packages>\n                <package>github.com/raydac/mvn-golang-cvs-test</package>\n              </packages>\n            </configuration>\n          </execution>\n          <execution>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/cvs-git-branch-master/src/main.go",
    "content": "package main\n\nimport \"github.com/raydac/mvn-golang-cvs-test\"\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Printf(mvngolangcvstest.GetSomeText())\n\tif mvngolangcvstest.GetSomeText() != \"some_text_master_current\" {\n\t\tpanic(\"Wrong value, expected 'some_text_master_current'\")\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/cvs-git-branch-v2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>test-git-cvs</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>cvs-git-branch-v2</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <description>Test of loading non-main branch</description>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <sources>${src.preprocessed}</sources>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-build</id>\n            <configuration>\n              <buildFlags>\n                <flag>-a</flag>\n              </buildFlags>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-fix</id>\n            <phase>initialize</phase>\n          </execution>\n          <execution>\n            <id>default-get</id>\n            <configuration>\n              <enforceDeletePackageFiles>true</enforceDeletePackageFiles>\n              <packages>\n                <package>github.com/raydac/mvn-golang-cvs-test</package>\n              </packages>\n              <branch>v2</branch>\n            </configuration>\n          </execution>\n          <execution>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/cvs-git-branch-v2/src/main.go",
    "content": "package main\n\nimport \"github.com/raydac/mvn-golang-cvs-test\"\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Printf(mvngolangcvstest.GetSomeText())\n\tif mvngolangcvstest.GetSomeText() != \"some_text_version2\" {\n\t\tpanic(\"Wrong value, expected 'some_text_version2'\")\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/cvs-git-custom/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>test-git-cvs</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>cvs-git-custom</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <description>Test of loading main branch with tag</description>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>${project.groupId}</groupId>\n      <artifactId>cvs-git-master-tag</artifactId>\n      <version>${project.version}</version>\n      <type>mvn-golang</type>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <sources>${src.preprocessed}</sources>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-build</id>\n            <configuration>\n              <buildFlags>\n                <flag>-a</flag>\n              </buildFlags>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-fix</id>\n            <phase>initialize</phase>\n          </execution>\n          <execution>\n            <id>default-get</id>\n            <configuration>\n              <packages>\n                <package>github.com/raydac/mvn-golang-cvs-test</package>\n              </packages>\n              <enforceDeletePackageFiles>true</enforceDeletePackageFiles>\n              <customCvsOptions>\n                <op>checkout</op>\n                <op>-B</op>\n                <op>master</op>\n                <op>tags/master_tag1</op>\n              </customCvsOptions>\n            </configuration>\n          </execution>\n          <execution>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/cvs-git-custom/src/main.go",
    "content": "package main\n\nimport \"github.com/raydac/mvn-golang-cvs-test\"\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Printf(mvngolangcvstest.GetSomeText())\n\tif mvngolangcvstest.GetSomeText() != \"some_text_master_tagged\" {\n\t\tpanic(\"Wrong value, expected 'some_text_master_tagged'\")\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/cvs-git-master-tag/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>test-git-cvs</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>cvs-git-master-tag</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <description>Test of loading main branch with tag</description>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>${project.groupId}</groupId>\n      <artifactId>cvs-git-branch-master</artifactId>\n      <version>${project.version}</version>\n      <type>mvn-golang</type>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <sources>${src.preprocessed}</sources>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-build</id>\n            <configuration>\n              <buildFlags>\n                <flag>-a</flag>\n              </buildFlags>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-fix</id>\n            <phase>initialize</phase>\n          </execution>\n          <execution>\n            <id>default-get</id>\n            <configuration>\n              <enforceDeletePackageFiles>true</enforceDeletePackageFiles>\n              <packages>\n                <package>github.com/raydac/mvn-golang-cvs-test</package>\n              </packages>\n              <branch>master</branch>\n              <tag>master_tag1</tag>\n            </configuration>\n          </execution>\n          <execution>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/cvs-git-master-tag/src/main.go",
    "content": "package main\n\nimport \"github.com/raydac/mvn-golang-cvs-test\"\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Printf(mvngolangcvstest.GetSomeText())\n\tif mvngolangcvstest.GetSomeText() != \"some_text_master_tagged\" {\n\t\tpanic(\"Wrong value, expected 'some_text_master_tagged'\")\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/cvs-git-revision/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>test-git-cvs</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>cvs-git-revision</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>mvn-golang</packaging>\n\n  <description>Test of loading revision</description>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>${project.groupId}</groupId>\n      <artifactId>cvs-git-branch-v2</artifactId>\n      <version>${project.version}</version>\n      <type>mvn-golang</type>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <sourceDirectory>${basedir}${file.separator}src</sourceDirectory>\n    <directory>${basedir}${file.separator}bin</directory>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${main-project-version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <goVersion>${go.sdk.version}</goVersion>\n          <sources>${src.preprocessed}</sources>\n          <env>\n            <GO111MODULE>auto</GO111MODULE>\n          </env>\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-build</id>\n            <configuration>\n              <buildFlags>\n                <flag>-a</flag>\n              </buildFlags>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-fix</id>\n            <phase>initialize</phase>\n          </execution>\n          <execution>\n            <id>default-get</id>\n            <configuration>\n              <enforceDeletePackageFiles>true</enforceDeletePackageFiles>\n              <packages>\n                <package>github.com/raydac/mvn-golang-cvs-test</package>\n              </packages>\n              <revision>53dca7f87202ae2c34b897b80e5f7c1a9bed12ad</revision>\n            </configuration>\n          </execution>\n          <execution>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <package>main.go</package>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/cvs-git-revision/src/main.go",
    "content": "package main\n\nimport \"github.com/raydac/mvn-golang-cvs-test\"\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Printf(mvngolangcvstest.GetSomeText())\n\tif mvngolangcvstest.GetSomeText() != \"some_text\" {\n\t\tpanic(\"Wrong value, expected 'some_text'\")\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-examples/test-git-cvs/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n    <parent>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-examples</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n    </parent>\n    \n    <artifactId>test-git-cvs</artifactId>\n    <packaging>pom</packaging>\n\n    <description>Test of 'get' for different identifiers in GIT repository</description>\n\n    <modules>\n        <module>cvs-git-branch-v2</module>\n        <module>cvs-git-revision</module>\n        <module>cvs-git-branch-master</module>\n        <module>cvs-git-master-tag</module>\n        <module>cvs-git-custom</module>\n    </modules>\n</project>\n"
  },
  {
    "path": "mvn-golang-hello/pom.xml",
    "content": "<?xml version=\"1.0\"?>\n<project xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n  <modelVersion>4.0.0</modelVersion>\n  \n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang</artifactId>\n    <version>2.3.11-SNAPSHOT</version>\n  </parent>\n  \n  <groupId>com.igormaznitsa</groupId>\n  <artifactId>mvn-golang-hello</artifactId>\n  <packaging>jar</packaging>\n  \n  <name>Maven GoLang archetype</name>\n  <description>Archetype generates a sample mvn-golang project</description>\n  \n  <profiles>\n    <profile>\n      <id>publish</id>\n      <build>\n        <plugins>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-assembly-plugin</artifactId>\n            <version>3.1.1</version>\n            <executions>\n              <execution>\n                <id>make-distributive</id>\n                <phase>install</phase>\n                <goals>\n                  <goal>single</goal>\n                </goals>\n                <configuration>\n                  <appendAssemblyId>false</appendAssemblyId>\n                  <finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}-distr</finalName>\n                  <descriptors>\n                    <descriptor>src/assemble/distribution.xml</descriptor>\n                  </descriptors>\n                </configuration>\n              </execution>\n              <execution>\n                <id>make-bundle</id>\n                <phase>install</phase>\n                <goals>\n                  <goal>single</goal>\n                </goals>\n                <configuration>\n                  <descriptors>\n                    <descriptor>src/assemble/bundle.xml</descriptor>\n                  </descriptors>\n                </configuration>\n              </execution>\n            </executions>\n          </plugin>\n          <plugin>\n            <groupId>com.igormaznitsa</groupId>\n            <artifactId>uber-pom</artifactId>\n            <version>${uber.pom}</version>\n            <configuration>\n              <remove>\n                <section>parent</section>\n                <section>modules</section>\n                <section>profiles/profile/modules</section>\n              </remove>\n              <removeSiblingDuplications>true</removeSiblingDuplications>\n            </configuration>\n            <executions>\n              <execution>\n                <goals>\n                  <goal>upom</goal>\n                </goals>\n              </execution>\n            </executions>\n          </plugin>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-source-plugin</artifactId>\n            <version>3.1.0</version>\n            <executions>\n              <execution>\n                <id>generate-sources</id>\n                <phase>package</phase>\n                <goals>\n                  <goal>jar</goal>\n                </goals>\n              </execution>\n            </executions>\n          </plugin>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-javadoc-plugin</artifactId>\n            <version>3.1.1</version>\n            <executions>\n              <execution>\n                <id>generate-javadoc</id>\n                <phase>package</phase>\n                <goals>\n                  <goal>jar</goal>\n                </goals>\n                <configuration>\n                  <source>8</source>\n                </configuration>\n              </execution>\n            </executions>\n          </plugin>\n\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-gpg-plugin</artifactId>\n            <version>1.6</version>\n            <executions>\n              <execution>\n                <id>sign-artifacts</id>\n                <phase>verify</phase>\n                <goals>\n                  <goal>sign</goal>\n                </goals>\n              </execution>\n            </executions>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n  </profiles>\n  \n  \n</project>\n"
  },
  {
    "path": "mvn-golang-hello/src/assemble/bundle.xml",
    "content": "\n<assembly xmlns=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd\">\n    <id>bundle</id>\n  \n    <includeBaseDirectory>false</includeBaseDirectory>\n    <includeSiteDirectory>false</includeSiteDirectory>\n\n    <formats>\n        <format>jar</format>\n    </formats>    \n    <fileSets>\n        <fileSet>\n            <directory>${project.build.directory}</directory>\n            <outputDirectory>/</outputDirectory>\n            <includes>\n              <include>*.jar.asc</include>\n              <include>*.jar</include>\n              <include>*.pom</include>\n              <include>*.pom.asc</include>\n            </includes>\n            <excludes>\n              <exclude>original*.*</exclude>\n              <exclude>*.zip</exclude>\n            </excludes>\n        </fileSet>\n    </fileSets>\n</assembly>"
  },
  {
    "path": "mvn-golang-hello/src/assemble/distribution.xml",
    "content": "\n<assembly xmlns=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2\"\n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd\">\n  <id>distr</id>\n  \n  <includeBaseDirectory>false</includeBaseDirectory>\n  <includeSiteDirectory>false</includeSiteDirectory>\n\n  <formats>\n    <format>tar.gz</format>\n  </formats>\n  <fileSets>\n    <fileSet>\n      <directory>${project.basedir}</directory>\n      <outputDirectory>/project</outputDirectory>\n      <excludes>\n        <exclude>target/</exclude>\n        <exclude>texts/</exclude>\n        <exclude>nbactions.xml</exclude>\n        <exclude>catalog.xml</exclude>\n        <exclude>**/.*</exclude>\n      </excludes>\n    </fileSet>\n    <fileSet>\n      <outputDirectory>/lib</outputDirectory>\n      <directory>${project.basedir}/target</directory>\n      <includes>\n        <include>${project.build.finalName}.jar</include>\n      </includes>\n    </fileSet>\n    <fileSet>\n      <outputDirectory>/lib</outputDirectory>\n      <directory>${project.basedir}</directory>\n      <includes>\n        <include>pom.xml</include>\n      </includes>\n    </fileSet>\n    <fileSet>\n      <outputDirectory>/</outputDirectory>\n      <directory>${basedir}/texts</directory>\n      <includes>\n        <include>*.*</include>\n      </includes>\n    </fileSet>\n  </fileSets>\n</assembly>"
  },
  {
    "path": "mvn-golang-hello/src/main/resources/META-INF/maven/archetype-metadata.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archetype-descriptor\n  name=\"mvn-golang-hello\"\n  xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd\"\n  xmlns=\"http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0\"\n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n\n  <requiredProperties>\n    <requiredProperty key=\"package\">\n      <defaultValue>main</defaultValue>\n    </requiredProperty>\n    <requiredProperty key=\"gowrapper\">\n      <defaultValue>2.3.11-SNAPSHOT</defaultValue>\n    </requiredProperty>\n    <requiredProperty key=\"gosdk\">\n      <defaultValue>1.21.7</defaultValue>\n    </requiredProperty>\n  </requiredProperties>\n\n  <fileSets>\n    <fileSet filtered=\"true\" encoding=\"UTF-8\">\n      <directory>res</directory>\n    </fileSet>\n    <fileSet filtered=\"true\" encoding=\"UTF-8\">\n      <directory>bin</directory>\n    </fileSet>\n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>src</directory>\n      <includes>\n        <include>**/*.go</include>\n        <include>**/*.mod</include>\n      </includes>\n    </fileSet>\n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory></directory>\n      <includes>\n        <include>*.xml</include>\n        <include>*.txt</include>\n      </includes>\n    </fileSet>\n  </fileSets>\n    \n</archetype-descriptor>"
  },
  {
    "path": "mvn-golang-hello/src/main/resources/archetype-resources/packages.txt",
    "content": "// this fle can contain dependencies in format\n// package: <NAME> [,branch: <BRANCH>][, tag: <TAG>][, revision: <REVISION>]\n// example:\n//   package:github.com/gizak/termui, branch:v2\n\n"
  },
  {
    "path": "mvn-golang-hello/src/main/resources/archetype-resources/pom.xml",
    "content": "#set($dollar = '$')\n#set($str = \"\")\n#set($dt = $str.getClass().forName(\"java.util.Date\").newInstance())\n#set($year = $dt.getYear() + 1900)\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  \n  <groupId>${groupId}</groupId>\n  <artifactId>${artifactId}</artifactId>\n  <version>${version}</version>\n  <packaging>mvn-golang</packaging>\n  \n  <name>Hello GoLang</name>\n  <description>Simple 'Hello World!' GoLang example</description>\n  <url>https://github.com/raydac/mvn-golang</url>\n\n  <properties>\n    <mvn.golang.go.version>${gosdk}</mvn.golang.go.version>\n    <mvn.golang.get.packages.file>${dollar}{basedir}${dollar}{file.separator}packages.txt</mvn.golang.get.packages.file>\n    <go.wrapper.plugin.version>${gowrapper}</go.wrapper.plugin.version>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>\n    <mvn.version>3.0</mvn.version>\n    <final.extension></final.extension>\n  </properties>\n\n  <inceptionYear>${year}</inceptionYear>\n\n  <licenses>\n    <license>\n      <name>The Apache Software License, Version 2.0</name>\n      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n      <distribution>repo</distribution>\n    </license>\n  </licenses>\n\n  <prerequisites>\n    <maven>${dollar}{mvn.version}</maven>\n  </prerequisites>\n\n  <profiles>\n    <profile>\n      <id>windows-profile</id>\n      <activation>\n        <os>\n          <family>windows</family>\n        </os>\n      </activation>\n      <properties>\n        <final.extension>.exe</final.extension>\n      </properties>\n    </profile>\n  </profiles>\n\n  <build>\n    <defaultGoal>clean package</defaultGoal>\n    <finalName>${dollar}{project.artifactId}-${dollar}{maven.build.timestamp}${dollar}{final.extension}</finalName>\n    <sourceDirectory>${dollar}{basedir}${dollar}{file.separator}src</sourceDirectory>\n    <directory>${dollar}{basedir}${dollar}{file.separator}bin</directory>\n    <resources>\n      <resource>\n        <directory>${dollar}{basedir}${dollar}{file.separator}res</directory>\n      </resource>\n    </resources>\n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <version>${dollar}{go.wrapper.plugin.version}</version>\n        <extensions>true</extensions>\n        <configuration>\n          <!--<goPath>${dollar}{basedir}</goPath>-->\n          <!--<enforceGoPathToEnd>true</enforceGoPathToEnd>-->\n          <!--<verbose>true</verbose>-->\n        </configuration>\n        <executions>\n          <execution>\n            <id>default-build</id>\n            <configuration>\n              <packages>\n                <main>hello.go</main>\n              </packages>\n            </configuration>\n          </execution>\n          <execution>\n            <id>golang-run</id>\n            <phase>verify</phase>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <configuration>\n              <packages>\n                <app>hello.go</app>\n              </packages>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-hello/src/main/resources/archetype-resources/src/go.mod",
    "content": "module github.com/raydac/mvn-golang/example/hello"
  },
  {
    "path": "mvn-golang-hello/src/main/resources/archetype-resources/src/hello.go",
    "content": "package ${package}\n\nimport \"fmt\"\n\nfunc Hello(text string) string {\n\treturn text\n}\n\nfunc main() {\n\tfmt.Printf(Hello(\"Hello, world.\\n\"))\n}\n"
  },
  {
    "path": "mvn-golang-hello/src/main/resources/archetype-resources/src/hello_test.go",
    "content": "package ${package}\n\nimport \"testing\"\n\nfunc TestHello(t *testing.T) {\n\tstr := Hello(\"xxx\")\n\tif str != \"xxx\" {\n\t\tt.Fail()\n\t}\n}\n"
  },
  {
    "path": "mvn-golang-hello-multi/pom.xml",
    "content": "<?xml version=\"1.0\"?>\n<project xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n  <modelVersion>4.0.0</modelVersion>\n  \n  <parent>\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvn-golang</artifactId>\n    <version>2.3.11-SNAPSHOT</version>\n  </parent>\n  \n  <groupId>com.igormaznitsa</groupId>\n  <artifactId>mvn-golang-hello-multi</artifactId>\n  <packaging>jar</packaging>\n  \n  <name>Maven GoLang Multi-module archetype</name>\n  <description>Archetype generates a sample multi-module mvn-golang project</description>\n  \n  <profiles>\n    <profile>\n      <id>publish</id>\n      <build>\n        <plugins>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-assembly-plugin</artifactId>\n            <version>3.1.1</version>\n            <executions>\n              <execution>\n                <id>make-distributive</id>\n                <phase>install</phase>\n                <goals>\n                  <goal>single</goal>\n                </goals>\n                <configuration>\n                  <appendAssemblyId>false</appendAssemblyId>\n                  <finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}-distr</finalName>\n                  <descriptors>\n                    <descriptor>src/assemble/distribution.xml</descriptor>\n                  </descriptors>\n                </configuration>\n              </execution>\n              <execution>\n                <id>make-bundle</id>\n                <phase>install</phase>\n                <goals>\n                  <goal>single</goal>\n                </goals>\n                <configuration>\n                  <descriptors>\n                    <descriptor>src/assemble/bundle.xml</descriptor>\n                  </descriptors>\n                </configuration>\n              </execution>\n            </executions>\n          </plugin>\n          <plugin>\n            <groupId>com.igormaznitsa</groupId>\n            <artifactId>uber-pom</artifactId>\n            <version>${uber.pom}</version>\n            <configuration>\n              <remove>\n                <section>parent</section>\n                <section>modules</section>\n                <section>profiles/profile/modules</section>\n              </remove>\n              <removeSiblingDuplications>true</removeSiblingDuplications>\n            </configuration>\n            <executions>\n              <execution>\n                <goals>\n                  <goal>upom</goal>\n                </goals>\n              </execution>\n            </executions>\n          </plugin>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-source-plugin</artifactId>\n            <version>3.1.0</version>\n            <executions>\n              <execution>\n                <id>generate-sources</id>\n                <phase>package</phase>\n                <goals>\n                  <goal>jar</goal>\n                </goals>\n              </execution>\n            </executions>\n          </plugin>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-javadoc-plugin</artifactId>\n            <version>3.1.1</version>\n            <executions>\n              <execution>\n                <id>generate-javadoc</id>\n                <phase>package</phase>\n                <goals>\n                  <goal>jar</goal>\n                </goals>\n                <configuration>\n                  <source>8</source>\n                </configuration>\n              </execution>\n            </executions>\n          </plugin>\n\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-gpg-plugin</artifactId>\n            <version>1.6</version>\n            <executions>\n              <execution>\n                <id>sign-artifacts</id>\n                <phase>verify</phase>\n                <goals>\n                  <goal>sign</goal>\n                </goals>\n              </execution>\n            </executions>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n  </profiles>\n  \n  \n</project>\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/assemble/bundle.xml",
    "content": "\n<assembly xmlns=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd\">\n    <id>bundle</id>\n  \n    <includeBaseDirectory>false</includeBaseDirectory>\n    <includeSiteDirectory>false</includeSiteDirectory>\n\n    <formats>\n        <format>jar</format>\n    </formats>    \n    <fileSets>\n        <fileSet>\n            <directory>${project.build.directory}</directory>\n            <outputDirectory>/</outputDirectory>\n            <includes>\n              <include>*.jar.asc</include>\n              <include>*.jar</include>\n              <include>*.pom</include>\n              <include>*.pom.asc</include>\n            </includes>\n            <excludes>\n              <exclude>original*.*</exclude>\n              <exclude>*.zip</exclude>\n            </excludes>\n        </fileSet>\n    </fileSets>\n</assembly>"
  },
  {
    "path": "mvn-golang-hello-multi/src/assemble/distribution.xml",
    "content": "\n<assembly xmlns=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2\"\n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd\">\n  <id>distr</id>\n  \n  <includeBaseDirectory>false</includeBaseDirectory>\n  <includeSiteDirectory>false</includeSiteDirectory>\n\n  <formats>\n    <format>tar.gz</format>\n  </formats>\n  <fileSets>\n    <fileSet>\n      <directory>${project.basedir}</directory>\n      <outputDirectory>/project</outputDirectory>\n      <excludes>\n        <exclude>target/</exclude>\n        <exclude>texts/</exclude>\n        <exclude>nbactions.xml</exclude>\n        <exclude>catalog.xml</exclude>\n        <exclude>**/.*</exclude>\n      </excludes>\n    </fileSet>\n    <fileSet>\n      <outputDirectory>/lib</outputDirectory>\n      <directory>${project.basedir}/target</directory>\n      <includes>\n        <include>${project.build.finalName}.jar</include>\n      </includes>\n    </fileSet>\n    <fileSet>\n      <outputDirectory>/lib</outputDirectory>\n      <directory>${project.basedir}</directory>\n      <includes>\n        <include>pom.xml</include>\n      </includes>\n    </fileSet>\n    <fileSet>\n      <outputDirectory>/</outputDirectory>\n      <directory>${basedir}/texts</directory>\n      <includes>\n        <include>*.*</include>\n      </includes>\n    </fileSet>\n  </fileSets>\n</assembly>"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/META-INF/maven/archetype-metadata.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archetype-descriptor\n  name=\"mvn-golang-hello\"\n  xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd\"\n  xmlns=\"http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0\"\n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n\n  <requiredProperties>\n    <requiredProperty key=\"package\">\n      <defaultValue>main</defaultValue>\n    </requiredProperty>\n    <requiredProperty key=\"gowrapper\">\n      <defaultValue>2.3.11-SNAPSHOT</defaultValue>\n    </requiredProperty>\n    <requiredProperty key=\"gosdk\">\n      <defaultValue>1.21.7</defaultValue>\n    </requiredProperty>\n  </requiredProperties>\n\n  <fileSets>\n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>app-1/res</directory>\n    </fileSet>\n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>app-1/src</directory>\n      <includes>\n        <include>**/*.go</include>\n      </includes>\n    </fileSet>\n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>app-1</directory>\n      <includes>\n        <include>*.iml</include>\n        <include>*.xml</include>\n      </includes>\n    </fileSet>\n    \n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>app-2/res</directory>\n    </fileSet>\n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>app-2/src</directory>\n      <includes>\n        <include>**/*.go</include>\n      </includes>\n    </fileSet>\n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>app-2</directory>\n      <includes>\n        <include>*.iml</include>\n        <include>*.xml</include>\n      </includes>\n    </fileSet>\n    \n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>common/res</directory>\n    </fileSet>\n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>common/src</directory>\n      <includes>\n        <include>**/*.go</include>\n      </includes>\n    </fileSet>\n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>common</directory>\n      <includes>\n        <include>*.iml</include>\n        <include>*.xml</include>\n      </includes>\n    </fileSet>\n    \n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory>assembly-results</directory>\n      <includes>\n        <!--<include>modules/assembly-results/*.iml</include>-->\n        <include>*.xml</include>\n      </includes>\n    </fileSet>\n    \n    <fileSet filtered=\"true\" packaged=\"false\">\n      <directory></directory>\n      <includes>\n        <include>*.xml</include>\n      </includes>\n    </fileSet>\n  </fileSets>\n    \n</archetype-descriptor>"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/app-1/pom.xml",
    "content": "#set($dollar = '$')\n#set($str = \"\")\n#set($dt = $str.getClass().forName(\"java.util.Date\").newInstance())\n#set($year = $dt.getYear() + 1900)\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>${groupId}</groupId>\n    <artifactId>${artifactId}</artifactId>\n    <version>${version}</version>\n  </parent>\n\n  <artifactId>${artifactId}-app-1</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>App-1</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>${groupId}</groupId>\n      <artifactId>${artifactId}-common</artifactId>\n      <version>${version}</version>\n      <type>mvn-golang</type>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <sourceDirectory>${dollar}{basedir}${dollar}{file.separator}src</sourceDirectory>\n    <directory>${dollar}{basedir}${dollar}{file.separator}bin</directory>\n    <finalName>${dollar}{project.artifactId}-${dollar}{project.version}${dollar}{final.extension}</finalName>\n\n    <resources>\n      <resource>\n        <directory>${dollar}{basedir}${dollar}{file.separator}res</directory>\n      </resource>\n    </resources>\n    \n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/app-1/src/main.go",
    "content": "package main\n\nimport (\n\t\"common\"\n)\n\nfunc main() {\n\tcommon.PrintHello(\"world\")\n}\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/app-1/src/main_test.go",
    "content": "package main\n\nimport \"testing\"\n\nfunc TestMain(t *testing.T) {\n\tmain()\n}\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/app-2/pom.xml",
    "content": "#set($dollar = '$')\n#set($str = \"\")\n#set($dt = $str.getClass().forName(\"java.util.Date\").newInstance())\n#set($year = $dt.getYear() + 1900)\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>${groupId}</groupId>\n    <artifactId>${artifactId}</artifactId>\n    <version>${version}</version>\n  </parent>\n\n  <artifactId>${artifactId}-app-2</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>App-2</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>${groupId}</groupId>\n      <artifactId>${artifactId}-common</artifactId>\n      <version>${version}</version>\n      <type>mvn-golang</type>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <sourceDirectory>${dollar}{basedir}${dollar}{file.separator}src</sourceDirectory>\n    <directory>${dollar}{basedir}${dollar}{file.separator}bin</directory>\n    <finalName>${dollar}{project.artifactId}-${dollar}{project.version}${dollar}{final.extension}</finalName>\n\n    <resources>\n      <resource>\n        <directory>${dollar}{basedir}${dollar}{file.separator}res</directory>\n      </resource>\n    </resources>\n    \n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/app-2/src/main.go",
    "content": "package main\n\nimport \"common\"\n\nfunc main() {\n\tcommon.PrintHello(\"universe\")\n}\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/app-2/src/main_test.go",
    "content": "package main\n\nimport \"testing\"\n\nfunc TestMain(t *testing.T) {\n\tmain()\n}\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/assembly-results/deploy.xml",
    "content": "<assembly xmlns=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2\" \n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd\">\n  <id>dist-assembly</id>\n  \n  <formats>\n    <format>tar.gz</format>\n  </formats>\n  \n  <includeBaseDirectory>false</includeBaseDirectory>\n  <includeSiteDirectory>false</includeSiteDirectory>\n  <baseDirectory></baseDirectory>\n  \n  <fileSets>\n    <fileSet>\n      <directory>${project.basedir}/../app-1/bin</directory>\n      <outputDirectory>/</outputDirectory>\n      <includes>\n        <include>${artifactId}-app-1-${project.version}</include>\n        <include>${artifactId}-app-1-${project.version}.exe</include>\n      </includes>\n    </fileSet>\n    <fileSet>\n      <directory>${project.basedir}/../app-2/bin</directory>\n      <outputDirectory>/</outputDirectory>\n      <includes>\n        <include>${artifactId}-app-2-${project.version}</include>\n        <include>${artifactId}-app-2-${project.version}.exe</include>\n      </includes>\n    </fileSet>\n  </fileSets>\n  \n</assembly>"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/assembly-results/pom.xml",
    "content": "#set($dollar = '$')\n#set($str = \"\")\n#set($dt = $str.getClass().forName(\"java.util.Date\").newInstance())\n#set($year = $dt.getYear() + 1900)\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>${groupId}</groupId>\n    <artifactId>${artifactId}</artifactId>\n    <version>${version}</version>\n  </parent>\n    \n  <artifactId>${artifactId}-assembly-results</artifactId>\n  <packaging>pom</packaging>\n    \n  <name>Assembly results</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>${dollar}{project.groupId}</groupId>\n      <artifactId>${artifactId}-app-1</artifactId>\n      <version>${dollar}{project.version}</version>\n      <type>mvn-golang</type>\n    </dependency>\n    <dependency>\n      <groupId>${dollar}{project.groupId}</groupId>\n      <artifactId>${artifactId}-app-2</artifactId>\n      <version>${dollar}{project.version}</version>\n      <type>mvn-golang</type>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <finalName>all-apps-${dollar}{project.version}</finalName>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-clean-plugin</artifactId>\n        <version>3.0.0</version>\n        <configuration>\n          <followSymLinks>false</followSymLinks>\n          <excludeDefaultDirectories>true</excludeDefaultDirectories>\n          <filesets>\n            <fileset>\n              <directory>${dollar}{basedir}${dollar}{file.separator}target</directory>\n            </fileset>\n          </filesets>\n        </configuration>\n      </plugin>\n      <plugin>\n        <artifactId>maven-assembly-plugin</artifactId>\n        <version>3.1.0</version>\n        <configuration>\n          <appendAssemblyId>false</appendAssemblyId>\n          <outputDirectory>${dollar}{basedir}/target</outputDirectory>\n          <descriptors>\n            <descriptor>${dollar}{basedir}/deploy.xml</descriptor>\n          </descriptors>\n        </configuration>\n        <executions>\n          <execution>\n            <id>create-archive</id>\n            <phase>package</phase>\n            <goals>\n              <goal>single</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n    \n</project>\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/common/pom.xml",
    "content": "#set($dollar = '$')\n#set($str = \"\")\n#set($dt = $str.getClass().forName(\"java.util.Date\").newInstance())\n#set($year = $dt.getYear() + 1900)\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>${groupId}</groupId>\n    <artifactId>${artifactId}</artifactId>\n    <version>${version}</version>\n  </parent>\n\n  <artifactId>${artifactId}-common</artifactId>\n  <packaging>mvn-golang</packaging>\n\n  <name>Common</name>\n\n  <build>\n    <sourceDirectory>${dollar}{basedir}${dollar}{file.separator}src</sourceDirectory>\n    <directory>${dollar}{basedir}${dollar}{file.separator}bin</directory>\n    \n    <resources>\n      <resource>\n        <directory>${dollar}{basedir}${dollar}{file.separator}res</directory>\n      </resource>\n    </resources>\n    \n    <plugins>\n      <plugin>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang-wrapper</artifactId>\n        <executions>\n          <execution>\n            <id>default-build</id>\n            <phase>none</phase>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/common/src/common/common.go",
    "content": "package common\n\nimport \"fmt\"\n\nfunc PrintHello(name string) {\n\tfmt.Println(\"Hello,\" + name)\n}\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/common/src/common/common_test.go",
    "content": "package common\n\nimport \"testing\"\n\nfunc TestPrintHello(t *testing.T) {\n\tPrintHello(\"Igor\")\n}\n"
  },
  {
    "path": "mvn-golang-hello-multi/src/main/resources/archetype-resources/pom.xml",
    "content": "#set($dollar = '$')\n#set($str = \"\")\n#set($dt = $str.getClass().forName(\"java.util.Date\").newInstance())\n#set($year = $dt.getYear() + 1900)\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>${groupId}</groupId>\n  <artifactId>${artifactId}</artifactId>\n  <version>${version}</version>\n  <packaging>pom</packaging>\n    \n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    <mvn.golang.go.version>${gosdk}</mvn.golang.go.version>\n    <go.wrapper.plugin.version>${gowrapper}</go.wrapper.plugin.version>\n    <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>\n    <mvn.version>3.0</mvn.version>\n    <final.extension></final.extension>\n  </properties>\n\n  <prerequisites>\n    <maven>${dollar}{mvn.version}</maven>\n  </prerequisites>\n\n  <profiles>\n    <profile>\n      <id>windows-profile</id>\n      <activation>\n        <os>\n          <family>Windows</family>\n        </os>\n      </activation>\n      <properties>\n        <final.extension>.exe</final.extension>\n      </properties>\n    </profile>\n    <!-- The Profile allows to pack all generated executable modules into ZIP archive -->\n    <profile>\n      <id>assembly</id>\n      <modules>\n        <module>assembly-results</module>\n      </modules>\n    </profile>\n  </profiles>\n\n  <modules>\n    <module>common</module>\n    <module>app-1</module>\n    <module>app-2</module>\n  </modules>\n  \n  <build>\n    <defaultGoal>clean package</defaultGoal>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>com.igormaznitsa</groupId>\n          <artifactId>mvn-golang-wrapper</artifactId>\n          <version>${dollar}{go.wrapper.plugin.version}</version>\n          <extensions>true</extensions>\n          <configuration>\n            <env>\n              <GO111MODULE>off</GO111MODULE>\n            </env>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>com.igormaznitsa</groupId>\n        <artifactId>mvn-golang</artifactId>\n        <version>2.3.11-SNAPSHOT</version>\n    </parent>\n\n    <artifactId>mvn-golang-wrapper</artifactId>\n    <packaging>maven-plugin</packaging>\n\n    <name>mvn-golang-wrapper</name>\n\n    <prerequisites>\n        <maven>${mvn.version}</maven>\n    </prerequisites>\n\n    <dependencies>\n        <dependency>\n            <groupId>joda-time</groupId>\n            <artifactId>joda-time</artifactId>\n            <version>2.12.7</version>\n        </dependency>\n        <dependency>\n            <groupId>com.igormaznitsa</groupId>\n            <artifactId>meta-annotations</artifactId>\n            <version>${meta.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.igormaznitsa</groupId>\n            <artifactId>meta-utils</artifactId>\n            <version>${meta.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>commons-io</groupId>\n            <artifactId>commons-io</artifactId>\n            <version>2.16.1</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.plugin-tools</groupId>\n            <artifactId>maven-plugin-annotations</artifactId>\n            <version>3.5</version>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-plugin-api</artifactId>\n            <version>${mvn.version}</version>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-core</artifactId>\n            <version>${mvn.version}</version>\n            <scope>provided</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.shared</groupId>\n            <artifactId>maven-artifact-transfer</artifactId>\n            <version>0.11.0</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.slf4j</groupId>\n                    <artifactId>slf4j-api</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>commons-codec</groupId>\n                    <artifactId>commons-codec</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-component-annotations</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>commons-io</groupId>\n                    <artifactId>commons-io</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <!--\n         ! Maven Compat is only needed for maven-plugin-testing-harness.\n        -->\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-compat</artifactId>\n            <version>3.0</version>\n            <scope>test</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>org.apache.maven.plugin-testing</groupId>\n            <artifactId>maven-plugin-testing-harness</artifactId>\n            <version>2.1</version>\n            <scope>test</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>org.apache.maven.shared</groupId>\n            <artifactId>maven-verifier</artifactId>\n            <version>1.8.0</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.zeroturnaround</groupId>\n            <artifactId>zt-exec</artifactId>\n            <version>1.12</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>commons-io</groupId>\n                    <artifactId>commons-io</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.slf4j</groupId>\n                    <artifactId>slf4j-api</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.zeroturnaround</groupId>\n            <artifactId>zt-zip</artifactId>\n            <version>1.17</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.slf4j</groupId>\n                    <artifactId>slf4j-api</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.commons</groupId>\n            <artifactId>commons-compress</artifactId>\n            <version>1.26.2</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>commons-codec</groupId>\n                    <artifactId>commons-codec</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>commons-codec</groupId>\n            <artifactId>commons-codec</artifactId>\n            <version>1.17.1</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.commons</groupId>\n            <artifactId>commons-lang3</artifactId>\n            <version>3.14.0</version>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.httpcomponents</groupId>\n            <artifactId>httpclient</artifactId>\n            <version>4.5.14</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>commons-codec</groupId>\n                    <artifactId>commons-codec</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-api</artifactId>\n            <version>1.7.36</version>\n        </dependency>\n        <dependency>\n            <groupId>org.slf4j</groupId>\n            <artifactId>slf4j-nop</artifactId>\n            <version>1.7.36</version>\n        </dependency>\n    </dependencies>\n\n    <profiles>\n        <profile>\n            <id>publish</id>\n            <build>\n                <plugins>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-assembly-plugin</artifactId>\n                        <executions>\n                            <execution>\n                                <id>make-distributive</id>\n                                <phase>install</phase>\n                                <goals>\n                                    <goal>single</goal>\n                                </goals>\n                                <configuration>\n                                    <appendAssemblyId>false</appendAssemblyId>\n                                    <finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}-distr\n                                    </finalName>\n                                    <descriptors>\n                                        <descriptor>src/assemble/distribution.xml</descriptor>\n                                    </descriptors>\n                                </configuration>\n                            </execution>\n                            <execution>\n                                <id>make-bundle</id>\n                                <phase>install</phase>\n                                <goals>\n                                    <goal>single</goal>\n                                </goals>\n                                <configuration>\n                                    <descriptors>\n                                        <descriptor>src/assemble/bundle.xml</descriptor>\n                                    </descriptors>\n                                </configuration>\n                            </execution>\n                        </executions>\n                    </plugin>\n                    <plugin>\n                        <groupId>com.igormaznitsa</groupId>\n                        <artifactId>uber-pom</artifactId>\n                        <version>${uber.pom}</version>\n                        <configuration>\n                            <remove>\n                                <section>parent</section>\n                                <section>modules</section>\n                                <section>profiles/profile/modules</section>\n                            </remove>\n                            <removeSiblingDuplications>true</removeSiblingDuplications>\n                        </configuration>\n                        <executions>\n                            <execution>\n                                <goals>\n                                    <goal>upom</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-source-plugin</artifactId>\n                        <executions>\n                            <execution>\n                                <id>generate-sources</id>\n                                <phase>package</phase>\n                                <goals>\n                                    <goal>jar-no-fork</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-javadoc-plugin</artifactId>\n                        <executions>\n                            <execution>\n                                <id>generate-javadoc</id>\n                                <phase>package</phase>\n                                <goals>\n                                    <goal>jar</goal>\n                                </goals>\n                                <configuration>\n                                    <source>8</source>\n                                </configuration>\n                            </execution>\n                        </executions>\n                    </plugin>\n\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-gpg-plugin</artifactId>\n                        <executions>\n                            <execution>\n                                <id>sign-artifacts</id>\n                                <phase>verify</phase>\n                                <goals>\n                                    <goal>sign</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n\n                </plugins>\n            </build>\n        </profile>\n    </profiles>\n\n    <build>\n        <resources>\n            <resource>\n                <directory>src/main/filtered-resources</directory>\n                <filtering>true</filtering>\n            </resource>\n        </resources>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-enforcer-plugin</artifactId>\n                <version>3.5.0</version>\n                <executions>\n                    <execution>\n                        <id>enforce-no-duplicate-dependencies</id>\n                        <goals>\n                            <goal>enforce</goal>\n                        </goals>\n                        <configuration>\n                            <rules>\n                                <banCircularDependencies/>\n                                <reactorModuleConvergence/>\n                                <dependencyConvergence>\n                                    <excludes>\n                                        <exclude>org.apache.maven.*</exclude>\n                                        <exclude>org.codehaus.plexus</exclude>\n                                    </excludes>\n                                </dependencyConvergence>\n                                <banDuplicatePomDependencyVersions/>\n                            </rules>\n                        </configuration>\n                    </execution>\n                </executions>\n                <dependencies>\n                    <dependency>\n                        <groupId>org.codehaus.mojo</groupId>\n                        <artifactId>extra-enforcer-rules</artifactId>\n                        <version>1.8.0</version>\n                    </dependency>\n                </dependencies>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>animal-sniffer-maven-plugin</artifactId>\n                <version>1.24</version>\n                <configuration>\n                    <signature>\n                        <groupId>org.codehaus.mojo.signature</groupId>\n                        <artifactId>java18</artifactId>\n                        <version>1.0</version>\n                    </signature>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>ensure-java-1.8-class-library</id>\n                        <phase>test</phase>\n                        <goals>\n                            <goal>check</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>meta-checker</artifactId>\n                <version>${meta.version}</version>\n                <configuration>\n                    <restrictClassFormat>8</restrictClassFormat>\n                    <checkNullable>true</checkNullable>\n                    <checkMayContainNull>true</checkMayContainNull>\n                    <failForAnnotations>\n                        <param>risky</param>\n                    </failForAnnotations>\n                    <ignoreClasses>\n                        <class>*.HelpMojo</class>\n                    </ignoreClasses>\n                </configuration>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>check</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-plugin-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>mojo-descriptor</id>\n                        <phase>process-classes</phase>\n                        <goals>\n                            <goal>descriptor</goal>\n                            <goal>helpmojo</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "mvn-golang-wrapper/src/assemble/bundle.xml",
    "content": "<assembly xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xmlns=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2\"\n          xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd\">\n    <id>bundle</id>\n\n    <includeBaseDirectory>false</includeBaseDirectory>\n    <includeSiteDirectory>false</includeSiteDirectory>\n\n    <formats>\n        <format>jar</format>\n    </formats>\n    <fileSets>\n        <fileSet>\n            <directory>${project.build.directory}</directory>\n            <outputDirectory>/</outputDirectory>\n            <includes>\n                <include>*.jar.asc</include>\n                <include>*.jar</include>\n                <include>*.pom</include>\n                <include>*.pom.asc</include>\n            </includes>\n            <excludes>\n                <exclude>original*.*</exclude>\n                <exclude>*.zip</exclude>\n            </excludes>\n        </fileSet>\n    </fileSets>\n</assembly>"
  },
  {
    "path": "mvn-golang-wrapper/src/assemble/distribution.xml",
    "content": "<assembly xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xmlns=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2\"\n          xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd\">\n    <id>distr</id>\n\n    <includeBaseDirectory>false</includeBaseDirectory>\n    <includeSiteDirectory>false</includeSiteDirectory>\n\n    <formats>\n        <format>tar.gz</format>\n    </formats>\n    <fileSets>\n        <fileSet>\n            <directory>${project.basedir}</directory>\n            <outputDirectory>/project</outputDirectory>\n            <excludes>\n                <exclude>target/</exclude>\n                <exclude>texts/</exclude>\n                <exclude>nbactions.xml</exclude>\n                <exclude>catalog.xml</exclude>\n                <exclude>**/.*</exclude>\n            </excludes>\n        </fileSet>\n        <fileSet>\n            <outputDirectory>/lib</outputDirectory>\n            <directory>${project.basedir}/target</directory>\n            <includes>\n                <include>${project.build.finalName}.jar</include>\n            </includes>\n        </fileSet>\n        <fileSet>\n            <outputDirectory>/lib</outputDirectory>\n            <directory>${project.basedir}</directory>\n            <includes>\n                <include>pom.xml</include>\n            </includes>\n        </fileSet>\n        <fileSet>\n            <outputDirectory>/</outputDirectory>\n            <directory>${basedir}/texts</directory>\n            <includes>\n                <include>*.*</include>\n            </includes>\n        </fileSet>\n    </fileSets>\n</assembly>"
  },
  {
    "path": "mvn-golang-wrapper/src/main/filtered-resources/META-INF/plexus/components.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<component-set>\n    <components>\n        <component>\n            <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>\n            <role-hint>mvn-golang</role-hint>\n            <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>\n            <configuration>\n                <lifecycles>\n                    <lifecycle>\n                        <id>default</id>\n                        <phases>\n                            <clean>com.igormaznitsa:mvn-golang-wrapper:${project.version}:clean</clean>\n                            <validate>com.igormaznitsa:mvn-golang-wrapper:${project.version}:fix</validate>\n                            <initialize>com.igormaznitsa:mvn-golang-wrapper:${project.version}:get</initialize>\n                            <generate-sources>com.igormaznitsa:mvn-golang-wrapper:${project.version}:generate\n                            </generate-sources>\n                            <process-sources>com.igormaznitsa:mvn-golang-wrapper:${project.version}:fmt\n                            </process-sources>\n                            <test>com.igormaznitsa:mvn-golang-wrapper:${project.version}:test</test>\n                            <package>com.igormaznitsa:mvn-golang-wrapper:${project.version}:build</package>\n                            <install>\n                                com.igormaznitsa:mvn-golang-wrapper:${project.version}:mvninstall,org.apache.maven.plugins:maven-install-plugin:install\n                            </install>\n                            <deploy>\n                                com.igormaznitsa:mvn-golang-wrapper:${project.version}:install,org.apache.maven.plugins:maven-deploy-plugin:deploy\n                            </deploy>\n                        </phases>\n                    </lifecycle>\n                </lifecycles>\n            </configuration>\n        </component>\n        <component>\n            <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n            <role-hint>mvn-golang</role-hint>\n            <implementation>com.igormaznitsa.mvngolang.utils.MvnGolangArtifactHandler</implementation>\n            <configuration>\n                <type>mvn-golang</type>\n                <addedToClasspath>false</addedToClasspath>\n                <includesDependencies>true</includesDependencies>\n            </configuration>\n        </component>\n    </components>\n</component-set>"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/AbstractGoDependencyAwareMojo.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.mvngolang.utils.*;\nimport org.apache.commons.io.FileUtils;\nimport org.apache.commons.io.FilenameUtils;\nimport org.apache.commons.io.filefilter.FileFilterUtils;\nimport org.apache.commons.io.filefilter.TrueFileFilter;\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugin.MojoFailureException;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException;\nimport org.zeroturnaround.zip.ZipUtil;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.File;\nimport java.io.IOException;\nimport java.nio.charset.StandardCharsets;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.List;\n\nimport static com.igormaznitsa.meta.common.utils.Assertions.assertNotNull;\n\npublic abstract class AbstractGoDependencyAwareMojo extends AbstractGolangMojo {\n\n  public static final String GO_MOD_FILE_NAME_BAK = \".#go.mod.mvn.orig\";\n  public static final String DELETE_GO_SUM_FLAG_FILE = \".#go.mod.mvn.delete.sum\";\n\n  /**\n   * Flag shows that sum file should be deleted during build.\n   * Since GoSDK 1.16, work with sum files was changed and they should not be removed anymore because will not be restored automatically.\n   * Also can be reached through 'mvn.golang.delete.sum.file'\n   *\n   * @since 2.3.8\n   */\n  @Parameter(name = \"deleteSumFile\", defaultValue = \"false\")\n  private boolean deleteSumFile = false;\n\n  /**\n   * Internal variable to keep GOPATH part containing folders of unpacked\n   * mvn-golang dependencies.\n   *\n   * @since 2.3.0\n   */\n  private String extraGoPathSectionInOsFormat = \"\";\n\n  /**\n   * Find artifacts generated by Mvn-Golang among scope dependencies, unpack\n   * them and add unpacked folders into GOPATH during execution.\n   *\n   * @since 2.3.0\n   */\n  @Parameter(name = \"scanDependencies\", defaultValue = \"true\")\n  private boolean scanDependencies = true;\n\n  /**\n   * Include test dependencies into scanning process activated if\n   * {@code scanDependencies=true}\n   *\n   * @since 2.3.0\n   */\n  @Parameter(name = \"includeTestDependencies\", defaultValue = \"true\")\n  private boolean includeTestDependencies = true;\n\n  /**\n   * Path to the folder where resolved mvn-golang dependency artifacts will be\n   * temporary unpacked and those paths will be added into GOPATH, activated if\n   * {@code scanDependencies=true}\n   *\n   * @since 2.3.0\n   */\n  @Parameter(name = \"dependencyTempFolder\", defaultValue = \"${project.build.directory}${file.separator}.__deps__\")\n  private String dependencyTempFolder;\n\n  /**\n   * Flag to turn on session synchronization to prevent parallel processing of\n   * modules in module mode if session is parallel one. Can be defined through property 'mvn.golang.sync.session.if.modules'\n   *\n   * @see #isModuleMode()\n   * @since 2.3.3\n   */\n  @Parameter(name = \"syncSessionIfModules\", defaultValue = \"true\")\n  private boolean syncSessionIfModules;\n\n  public boolean isSyncSessionIfModules() {\n    return Boolean.parseBoolean(findMvnProperty(\"mvn.golang.sync.session.if.modules\",\n            Boolean.toString(this.syncSessionIfModules)));\n  }\n\n  public void setSyncSessionIfModules(final boolean value) {\n    this.syncSessionIfModules = value;\n  }\n\n  @Nonnull\n  public String getDependencyTempFolder() {\n    return this.dependencyTempFolder;\n  }\n\n  public boolean isDeleteSumFile() {\n    return Boolean.parseBoolean(findMvnProperty(\"mvn.golang.delete.sum.file\",\n            Boolean.toString(this.deleteSumFile)));\n  }\n\n  public void setDependencyTempFolder(@Nonnull final String path) {\n    this.dependencyTempFolder = assertNotNull(path);\n  }\n\n  public boolean isScanDependencies() {\n    return this.scanDependencies;\n  }\n\n  public void setScanDependencies(final boolean flag) {\n    this.scanDependencies = flag;\n  }\n\n  public boolean isIncludeTestDependencies() {\n    return this.includeTestDependencies;\n  }\n\n  public void setIncludeTestDependencies(final boolean value) {\n    this.includeTestDependencies = value;\n  }\n\n  @Nonnull\n  private String makeRelativePathToFolder(@Nonnull final File goModFile,\n                                          @Nonnull final File folder) {\n    return goModFile.toPath().relativize(folder.toPath()).toString();\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  private List<Tuple<Artifact, Tuple<GoMod, File>>> findModsInProject() throws IOException {\n    final File sourceFolder = this.getSources(false);\n    if (sourceFolder.isDirectory()) {\n      return findGoModsAndParse(Collections\n              .singletonList(Tuple.of(this.getProject().getArtifact(), sourceFolder)));\n    } else {\n      return Collections.emptyList();\n    }\n  }\n\n  private void preprocessModules(\n          @Nonnull @MustNotContainNull final List<Tuple<Artifact, File>> unpackedDependencyFolders)\n          throws MojoExecutionException {\n    try {\n      final List<Tuple<Artifact, Tuple<GoMod, File>>> lst =\n              preprocessModuleFilesInDependencies(unpackedDependencyFolders);\n      final List<Tuple<GoMod, File>> dependencyGoMods = listRightPart(lst);\n\n      final List<Tuple<Artifact, Tuple<GoMod, File>>> projectGoMods = findModsInProject();\n\n      for (final Tuple<Artifact, Tuple<GoMod, File>> f : projectGoMods) {\n        final File goModFile = f.right().right();\n        final File workingFolder = goModFile.getParentFile();\n        final File sumFile = new File(workingFolder, GO_SUM_FILE_NAME);\n        final File goModFileBak = new File(workingFolder, GO_MOD_FILE_NAME_BAK);\n        final File deleteSumFileFlag = new File(workingFolder, DELETE_GO_SUM_FLAG_FILE);\n\n        final boolean deleteSum = this.isDeleteSumFile();\n\n        if (deleteSum) {\n          this.getLog().warn(\"SUM file will be deleted for artifact: \" + f.left());\n        }\n\n        if (goModFileBak.isFile()) {\n          if (goModFile.isFile() && !goModFile.delete()) {\n            throw new IOException(\"Can't delete go.mod file: \" + goModFile);\n          }\n          if (deleteSum && deleteSumFileFlag.isFile() && sumFile.isFile() && !sumFile.delete()) {\n            throw new IOException(\"Can't delete file \" + sumFile);\n          }\n          FileUtils.copyFile(goModFileBak, goModFile);\n        } else {\n          if (goModFile.isFile()) {\n            FileUtils.copyFile(goModFile, goModFileBak);\n          }\n          if (deleteSum && !sumFile.isFile() && !deleteSumFileFlag.isFile() &&\n                  !deleteSumFileFlag.createNewFile()) {\n            throw new IOException(\"Can't create file \" + deleteSumFileFlag);\n          }\n        }\n\n        if (goModFile.isFile()) {\n          final GoMod parsed =\n                  GoMod.from(FileUtils.readFileToString(goModFile, StandardCharsets.UTF_8));\n          if (replaceLinksToModules(Tuple.of(parsed, goModFile), dependencyGoMods)) {\n            FileUtils.write(goModFile, parsed.toString(), StandardCharsets.UTF_8);\n          }\n          if (deleteSum && sumFile.isFile() && !deleteSumFileFlag.isFile() &&\n                  !deleteSumFileFlag.createNewFile()) {\n            throw new IOException(\"Can't create file \" + deleteSumFileFlag);\n          }\n        }\n      }\n    } catch (IOException ex) {\n      throw new MojoExecutionException(\"Can't process a go.mod file\", ex);\n    }\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  private List<Tuple<Artifact, Tuple<GoMod, File>>> findGoModsAndParse(\n          @Nonnull @MustNotContainNull final List<Tuple<Artifact, File>> unpackedFolders)\n          throws IOException {\n    final List<Tuple<Artifact, Tuple<GoMod, File>>> result = new ArrayList<>();\n\n    for (final Tuple<Artifact, File> tuple : unpackedFolders) {\n      for (final File f : FileUtils\n              .listFiles(tuple.right(), FileFilterUtils.nameFileFilter(\"go.mod\"),\n                      TrueFileFilter.INSTANCE)) {\n        final GoMod model = GoMod.from(FileUtils.readFileToString(f, StandardCharsets.UTF_8));\n        result.add(Tuple.of(tuple.left(), Tuple.of(model, f)));\n      }\n    }\n\n    return result;\n  }\n\n  private boolean replaceLinksToModules(@Nonnull final Tuple<GoMod, File> source,\n                                        @Nonnull @MustNotContainNull final List<Tuple<GoMod, File>> targets) throws IOException {\n    boolean changed = false;\n    for (final Tuple<GoMod, File> j : targets) {\n      if (!source.equals(j)) {\n        final GoMod thatParsedGoMod = j.left();\n        final File thatGoModFile = j.right();\n\n        if (source.left().hasRequireFor(thatParsedGoMod.getModule(), null) &&\n                !source.left().hasReplaceFor(thatParsedGoMod.getModule(), null)) {\n\n          final String relativePath = makeRelativePathToFolder(source.right().getParentFile(),\n                  thatGoModFile.getParentFile());\n          source.left().addItem(\n                  new GoMod.GoReplace(new GoMod.ModuleInfo(thatParsedGoMod.getModule()),\n                          new GoMod.ModuleInfo(relativePath)));\n          changed = true;\n        }\n      }\n    }\n    return changed;\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  private List<Tuple<GoMod, File>> listRightPart(\n          @Nonnull @MustNotContainNull final List<Tuple<Artifact, Tuple<GoMod, File>>> list) {\n    final List<Tuple<GoMod, File>> parsed = new ArrayList<>();\n    for (final Tuple<Artifact, Tuple<GoMod, File>> i : list) {\n      parsed.add(i.right());\n    }\n    return parsed;\n  }\n\n  private int generateCrossLinksBetweenArtifactGoMods(\n          @Nonnull @MustNotContainNull final List<Tuple<Artifact, Tuple<GoMod, File>>> unpackedFolders)\n          throws IOException {\n    int changes = 0;\n\n    final List<Tuple<GoMod, File>> parsed = listRightPart(unpackedFolders);\n\n    for (final Tuple<GoMod, File> i : parsed) {\n      if (replaceLinksToModules(i, parsed)) {\n        changes++;\n        FileUtils.write(i.right(), i.left().toString(), StandardCharsets.UTF_8);\n      }\n    }\n    return changes;\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  private List<Tuple<Artifact, Tuple<GoMod, File>>> preprocessModuleFilesInDependencies(\n          @Nonnull @MustNotContainNull final List<Tuple<Artifact, File>> unpackedFolders)\n          throws IOException {\n    getLog().debug(\"Finding go.mod descriptors in unpacked artifacts\");\n    final List<Tuple<Artifact, Tuple<GoMod, File>>> foundAndParsedGoMods =\n            findGoModsAndParse(unpackedFolders);\n    getLog().debug(String.format(\"Found %d go.mod descriptors\", foundAndParsedGoMods.size()));\n    final int changedGoModCounter = generateCrossLinksBetweenArtifactGoMods(foundAndParsedGoMods);\n    getLog().debug(\n            String.format(\"Changed %d go.mod descriptors in unpacked artifacts\", changedGoModCounter));\n\n    return foundAndParsedGoMods;\n  }\n\n  @Override\n  public final void doInit() throws MojoFailureException, MojoExecutionException {\n    super.doInit();\n\n    if (this.isModuleMode()) {\n      try {\n        final File src = this.getSources(false);\n        this.restoreGoModFromBackupAndRemoveBackup(src);\n      } catch (IOException ex) {\n        throw new MojoExecutionException(\n                \"Error during restoring of detected go.mod backup in source folder\", ex);\n      }\n    }\n\n    if (this.isScanDependencies()) {\n      getLog().info(\"Scanning maven dependencies\");\n      final List<Tuple<Artifact, File>> foundArtifacts;\n\n      try {\n        foundArtifacts = MavenUtils.scanForMvnGoArtifacts(\n                this.getProject(),\n                this.isIgnoreNonResolvableArtifact(),\n                this.isIncludeTestDependencies(),\n                this,\n                this.getSession(),\n                this.getExecution(),\n                this.getArtifactResolver(),\n                this.getRemoteRepositories());\n      } catch (ArtifactResolverException ex) {\n        throw new MojoFailureException(\"Can't resolve artifact\", ex);\n      }\n\n      if (foundArtifacts.isEmpty()) {\n        getLog().debug(\"Mvn golang dependencies are not found\");\n        if (this.isModuleMode()) {\n          this.preprocessModules(Collections.emptyList());\n        }\n        this.extraGoPathSectionInOsFormat = \"\";\n      } else {\n        getLog().debug(\"Found mvn-golang artifacts: \" + foundArtifacts);\n        final File dependencyTempTargetFolder = new File(this.getDependencyTempFolder());\n        getLog().debug(\"Dependencies will be unpacked into folder: \" + dependencyTempTargetFolder);\n        final List<Tuple<Artifact, File>> unpackedFolders =\n                unpackArtifactsIntoFolder(foundArtifacts, dependencyTempTargetFolder);\n\n        if (this.isModuleMode()) {\n          this.getLog().info(\"Module mode is activated\");\n          this.preprocessModules(unpackedFolders);\n          this.getLog().info(\"Dependencies are not added into GOPATH because module mode is on\");\n        } else {\n          final List<File> unpackedFolderList = new ArrayList<>();\n          for (final Tuple<Artifact, File> f : unpackedFolders) {\n            unpackedFolderList.add(f.right());\n          }\n\n          final String preparedExtraPartForGoPath =\n                  IOUtils.makeOsFilePathWithoutDuplications(unpackedFolderList.toArray(new File[0]));\n          getLog().debug(\"Prepared dependency path for GOPATH: \" + preparedExtraPartForGoPath);\n          this.extraGoPathSectionInOsFormat = preparedExtraPartForGoPath;\n        }\n      }\n    } else {\n      getLog().info(\"Maven dependency scanning is off\");\n    }\n  }\n\n  public boolean isIgnoreNonResolvableArtifact() {\n    return false;\n  }\n\n  private void restoreGoModFromBackupAndRemoveBackup(@Nonnull final File folder)\n          throws IOException {\n    final Collection<File> backupFiles = FileUtils\n            .listFiles(folder, FileFilterUtils.nameFileFilter(GO_MOD_FILE_NAME_BAK),\n                    TrueFileFilter.INSTANCE);\n\n    this.getLog().debug(String\n            .format(\"Restoring go.mod from backup in %s, detected %d files\", folder,\n                    backupFiles.size()));\n\n    for (final File backup : backupFiles) {\n      final File workingFolder = backup.getParentFile();\n      final File restored = new File(workingFolder, GO_MOD_FILE_NAME);\n      final File goSumFile = new File(workingFolder, GO_SUM_FILE_NAME);\n      final File deleteGoSumFileFlag = new File(workingFolder, DELETE_GO_SUM_FLAG_FILE);\n\n      if (restored.isFile() && !restored.delete()) {\n        throw new IOException(\"Can't delete file during backup restore: \" + restored);\n      }\n      if (!backup.renameTo(restored)) {\n        throw new IOException(\"Can't rename backup: \" + backup + \" -> \" + restored);\n      }\n\n      if (this.isDeleteSumFile()) {\n        if (deleteGoSumFileFlag.isFile()) {\n          if (!deleteGoSumFileFlag.delete()) {\n            throw new IOException(\"Can't delete file \" + deleteGoSumFileFlag);\n          }\n          if (goSumFile.isFile() && !goSumFile.delete()) {\n            throw new IOException(\"Can't delete file \" + goSumFile);\n          }\n        }\n      }\n    }\n  }\n\n  @Override\n  public void afterExecution(@Nullable final ProxySettings proxySettings, final boolean error)\n          throws MojoFailureException, MojoExecutionException {\n    try {\n      if (this.isModuleMode()) {\n        this.getLog().debug(\"module mode is on\");\n        final File srcFolder = this.getSources(false);\n        this.getLog().debug(\"Detected source folder: \" + srcFolder);\n        if (srcFolder.isDirectory()) {\n          if (this.isRestoreGoMod()) {\n            this.getLog().debug(\"Restoring go.mod from backup in source folder: \" + srcFolder);\n            this.restoreGoModFromBackupAndRemoveBackup(srcFolder);\n          } else {\n            this.getLog().debug(\"Restoring of go.mod from backup is disabled by project property\");\n          }\n        } else {\n          this.getLog()\n                  .debug(\"Restore backup mod files is ignored because source folder is not directory\");\n        }\n      } else {\n        this.getLog().debug(\"module mode is off\");\n      }\n    } catch (IOException ex) {\n      throw new MojoExecutionException(\"Error during restore go.mod from backup\", ex);\n    } finally {\n      super.afterExecution(proxySettings, error);\n    }\n  }\n\n  @Override\n  protected boolean doesNeedSessionLock() {\n    return this.getSession().isParallel() && this.isModuleMode() && this.isSyncSessionIfModules();\n  }\n\n  protected boolean isRestoreGoMod() {\n    return Boolean.parseBoolean(MavenUtils\n            .findProperty(this.getSession(), this.getProject(), \"mvn.golang.restore.go.mod\", \"true\"));\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  private List<Tuple<Artifact, File>> unpackArtifactsIntoFolder(@Nonnull\n                                                                @MustNotContainNull final List<Tuple<Artifact, File>> zippedArtifacts,\n                                                                @Nonnull final File targetFolder)\n          throws MojoExecutionException {\n    final List<Tuple<Artifact, File>> resultFolders = new ArrayList<>();\n\n    if (!targetFolder.isDirectory() && !targetFolder.mkdirs()) {\n      throw new MojoExecutionException(\n              \"Can't create folder to unpack dependencies: \" + targetFolder);\n    }\n\n    for (final Tuple<Artifact, File> zipFile : zippedArtifacts) {\n      if (this.isVerbose()) {\n        this.getLog().info(\"mvn-golang dependency: \" + zipFile.left());\n      }\n      final File outDir =\n              new File(targetFolder, FilenameUtils.getBaseName(zipFile.right().getName()));\n\n      final boolean doUnpackArch;\n      if (outDir.isDirectory()) {\n        this.getLog().debug(\"Unpacked dependency folder already exists: \" + outDir);\n        if (Boolean.parseBoolean(MavenUtils\n                .findProperty(this.getSession(), this.getProject(), \"mvn.golang.force.clean.dependency\",\n                        \"false\"))) {\n          this.getLog().debug(\"Forcing dependency folder delete: \" + outDir);\n          try {\n            FileUtils.deleteDirectory(outDir);\n          } catch (IOException ex) {\n            throw new MojoExecutionException(\"Can't delete dependency folder: \" + outDir, ex);\n          }\n          doUnpackArch = true;\n        } else {\n          getLog().debug(\"Ignoring dependency unpack because folder exists: \" + outDir);\n          doUnpackArch = false;\n        }\n      } else {\n        doUnpackArch = true;\n      }\n\n      if (doUnpackArch) {\n        if (ZipUtil\n                .containsEntry(zipFile.right(), GolangMvnInstallMojo.MVNGOLANG_BUILD_FOLDERS_FILE)) {\n          final File srcTargetFolder = new File(outDir, \"src\");\n          try {\n            unzipSrcFoldersContent(zipFile.right(), srcTargetFolder);\n          } catch (Exception ex) {\n            throw new MojoExecutionException(\n                    \"Can't unpack source folders from dependency archive '\" +\n                            zipFile.right().getName() + \"' into folder '\" + srcTargetFolder + '\\'', ex);\n          }\n        } else {\n          try {\n            getLog().debug(\"Unpack dependency archive: \" + zipFile);\n            ZipUtil.unpack(zipFile.right(), outDir, StandardCharsets.UTF_8);\n          } catch (Exception ex) {\n            throw new MojoExecutionException(\n                    \"Can't unpack dependency archive '\" + zipFile.right().getName() +\n                            \"' into folder '\" + targetFolder + '\\'', ex);\n          }\n        }\n      }\n\n      resultFolders.add(Tuple.of(zipFile.left(), outDir));\n    }\n    return resultFolders;\n  }\n\n  private boolean unzipSrcFoldersContent(@Nonnull final File artifactZip,\n                                         @Nonnull final File targetFolder) {\n    final byte[] buildFolderListFile =\n            ZipUtil.unpackEntry(artifactZip, GolangMvnInstallMojo.MVNGOLANG_BUILD_FOLDERS_FILE);\n    if (buildFolderListFile == null) {\n      return false;\n    } else {\n      final List<String> folderList = new ArrayList<>();\n      for (final String folder : new String(buildFolderListFile, StandardCharsets.UTF_8)\n              .split(\"\\\\n\")) {\n        final String trimmed = folder.trim();\n        if (trimmed.isEmpty()) {\n          continue;\n        }\n        folderList.add(folder + '/');\n      }\n\n      for (final String folder : folderList) {\n        ZipUtil.unpack(artifactZip, targetFolder, (@Nonnull final String name) -> {\n          if (name.startsWith(folder)) {\n            return name.substring(folder.length());\n          }\n          return null;\n        });\n      }\n      return true;\n    }\n  }\n\n  @Nonnull\n  @Override\n  protected final String getSpecialPartOfGoPath() {\n    return this.extraGoPathSectionInOsFormat;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/AbstractGoPackageAndDependencyAwareMojo.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.ArrayUtils;\nimport com.igormaznitsa.meta.common.utils.GetUtils;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.maven.plugins.annotations.Parameter;\n\npublic abstract class AbstractGoPackageAndDependencyAwareMojo\n    extends AbstractGoDependencyAwareMojo {\n\n  /**\n   * List of packages.\n   */\n  @Parameter(name = \"packages\")\n  private String[] packages;\n\n  @Nullable\n  @MustNotContainNull\n  protected String[] getDefaultPackages() {\n    return null;\n  }\n\n  @Nullable\n  @MustNotContainNull\n  public String[] getPackages() {\n    return this.packages == null ? this.getDefaultPackages() : this.packages.clone();\n  }\n\n  public void setPackages(@Nullable @MustNotContainNull final String[] value) {\n    this.packages = value;\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  public String[] getTailArguments() {\n    return GetUtils.ensureNonNull(getPackages(), ArrayUtils.EMPTY_STRING_ARRAY);\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  public String[] getCommandFlags() {\n    return ArrayUtils.EMPTY_STRING_ARRAY;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/AbstractGoPackageAwareMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.ArrayUtils;\nimport com.igormaznitsa.meta.common.utils.GetUtils;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.maven.plugins.annotations.Parameter;\n\npublic abstract class AbstractGoPackageAwareMojo extends AbstractGolangMojo {\n\n  /**\n   * List of packages.\n   */\n  @Parameter(name = \"packages\")\n  private String[] packages;\n\n  @Nullable\n  @MustNotContainNull\n  protected String[] getDefaultPackages() {\n    return null;\n  }\n\n  @Nullable\n  @MustNotContainNull\n  public String[] getPackages() {\n    return this.packages == null ? this.getDefaultPackages() : this.packages.clone();\n  }\n\n  public void setPackages(@Nullable @MustNotContainNull final String[] value) {\n    this.packages = value;\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  public String[] getTailArguments() {\n    return GetUtils.ensureNonNull(getPackages(), ArrayUtils.EMPTY_STRING_ARRAY);\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  public String[] getCommandFlags() {\n    return ArrayUtils.EMPTY_STRING_ARRAY;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/AbstractGolangMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport static com.igormaznitsa.meta.common.utils.Assertions.assertNotNull;\nimport static com.igormaznitsa.mvngolang.utils.MavenUtils.findProperty;\n\nimport com.igormaznitsa.meta.annotation.LazyInited;\nimport com.igormaznitsa.meta.annotation.MayContainNull;\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.annotation.ReturnsOriginal;\nimport com.igormaznitsa.meta.common.utils.ArrayUtils;\nimport com.igormaznitsa.meta.common.utils.GetUtils;\nimport com.igormaznitsa.meta.common.utils.StrUtils;\nimport com.igormaznitsa.mvngolang.utils.IOUtils;\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport com.igormaznitsa.mvngolang.utils.SysUtils;\nimport com.igormaznitsa.mvngolang.utils.UnpackUtils;\nimport com.igormaznitsa.mvngolang.utils.WildCardMatcher;\nimport com.igormaznitsa.mvngolang.utils.XGoogHashHeader;\nimport java.io.BufferedOutputStream;\nimport java.io.ByteArrayOutputStream;\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.StringReader;\nimport java.net.InetAddress;\nimport java.net.URLEncoder;\nimport java.net.UnknownHostException;\nimport java.nio.charset.Charset;\nimport java.security.KeyManagementException;\nimport java.security.NoSuchAlgorithmException;\nimport java.security.cert.CertificateException;\nimport java.security.cert.X509Certificate;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Comparator;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Locale;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.concurrent.locks.ReentrantLock;\nimport java.util.regex.Pattern;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport javax.net.ssl.SSLContext;\nimport javax.net.ssl.TrustManager;\nimport javax.net.ssl.X509TrustManager;\nimport javax.xml.parsers.DocumentBuilder;\nimport javax.xml.parsers.DocumentBuilderFactory;\nimport javax.xml.parsers.ParserConfigurationException;\nimport org.apache.commons.io.FileUtils;\nimport org.apache.commons.io.FilenameUtils;\nimport org.apache.commons.io.filefilter.FileFilterUtils;\nimport org.apache.commons.io.filefilter.TrueFileFilter;\nimport org.apache.commons.lang3.SystemUtils;\nimport org.apache.http.Header;\nimport org.apache.http.HttpEntity;\nimport org.apache.http.HttpException;\nimport org.apache.http.HttpHost;\nimport org.apache.http.HttpRequest;\nimport org.apache.http.HttpResponse;\nimport org.apache.http.HttpStatus;\nimport org.apache.http.StatusLine;\nimport org.apache.http.auth.AuthScope;\nimport org.apache.http.auth.NTCredentials;\nimport org.apache.http.client.CredentialsProvider;\nimport org.apache.http.client.HttpClient;\nimport org.apache.http.client.config.RequestConfig;\nimport org.apache.http.client.methods.HttpGet;\nimport org.apache.http.config.Registry;\nimport org.apache.http.config.RegistryBuilder;\nimport org.apache.http.conn.routing.HttpRoute;\nimport org.apache.http.conn.routing.HttpRoutePlanner;\nimport org.apache.http.conn.socket.ConnectionSocketFactory;\nimport org.apache.http.conn.socket.PlainConnectionSocketFactory;\nimport org.apache.http.conn.ssl.NoopHostnameVerifier;\nimport org.apache.http.conn.ssl.SSLConnectionSocketFactory;\nimport org.apache.http.impl.client.BasicCredentialsProvider;\nimport org.apache.http.impl.client.CloseableHttpClient;\nimport org.apache.http.impl.client.HttpClientBuilder;\nimport org.apache.http.impl.client.HttpClients;\nimport org.apache.http.impl.conn.BasicHttpClientConnectionManager;\nimport org.apache.http.impl.conn.DefaultProxyRoutePlanner;\nimport org.apache.http.protocol.HttpContext;\nimport org.apache.http.util.EntityUtils;\nimport org.apache.maven.artifact.repository.ArtifactRepository;\nimport org.apache.maven.execution.MavenSession;\nimport org.apache.maven.plugin.AbstractMojo;\nimport org.apache.maven.plugin.MojoExecution;\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugin.MojoFailureException;\nimport org.apache.maven.plugins.annotations.Component;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.project.MavenProject;\nimport org.apache.maven.settings.Proxy;\nimport org.apache.maven.settings.Settings;\nimport org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver;\nimport org.w3c.dom.Document;\nimport org.w3c.dom.Element;\nimport org.w3c.dom.NodeList;\nimport org.xml.sax.InputSource;\nimport org.xml.sax.SAXException;\nimport org.zeroturnaround.exec.ProcessExecutor;\nimport org.zeroturnaround.exec.ProcessResult;\n\npublic abstract class AbstractGolangMojo extends AbstractMojo {\n\n  public static final String GOARTIFACT_PACKAGING = \"mvn-golang\";\n  public static final String GO_MOD_FILE_NAME = \"go.mod\";\n  public static final String GO_SUM_FILE_NAME = \"go.sum\";\n  public static final String ENV_GO111MODULE = \"GO111MODULE\";\n\n  /**\n   * VERSION, OS, PLATFORM,-OSXVERSION\n   */\n  public static final String NAME_PATTERN = \"go%s.%s-%s%s\";\n  private static final List<String> ALLOWED_SDKARCHIVE_CONTENT_TYPE = Collections.unmodifiableList(\n      Arrays.asList(\"application/octet-stream\", \"application/zip\", \"application/x-tar\",\n          \"application/x-gzip\"));\n  private static final ReentrantLock LOCKER = new ReentrantLock();\n  private static final String[] BANNER =\n      new String[] {\"______  ___             _________     ______\",\n          \"___   |/  /__   __________  ____/________  / ______ ______________ _\",\n          \"__  /|_/ /__ | / /_  __ \\\\  / __ _  __ \\\\_  /  _  __ `/_  __ \\\\_  __ `/\",\n          \"_  /  / / __ |/ /_  / / / /_/ / / /_/ /  /___/ /_/ /_  / / /  /_/ / \",\n          \"/_/  /_/  _____/ /_/ /_/\\\\____/  \\\\____//_____/\\\\__,_/ /_/ /_/_\\\\__, /\",\n          \"                                                           /____/\",\n          \"                  https://github.com/raydac/mvn-golang\",\n          \"\"\n      };\n  private static final Pattern GOBINFOLDER_PATTERN = Pattern\n      .compile(\"(?:\\\\\\\\|/)go[0-9\\\\-\\\\+.]*(?:\\\\\\\\|/)bin(?:\\\\\\\\|/)?$\", Pattern.CASE_INSENSITIVE);\n  /**\n   * set of flags to be ignored among build and extra build flags, for inside\n   * use\n   */\n  protected final Set<String> buildFlagsToIgnore = new HashSet<>();\n  protected final List<String> tempBuildFlags = new ArrayList<>();\n  @Parameter(defaultValue = \"${settings}\", readonly = true)\n  protected Settings settings;\n  @Component\n  private ArtifactResolver artifactResolver;\n  @Parameter(defaultValue = \"${project.remoteArtifactRepositories}\", readonly = true, required = true)\n  private List<ArtifactRepository> remoteRepositories;\n  @Parameter(defaultValue = \"${project}\", readonly = true, required = true)\n  private MavenProject project;\n  @Parameter(defaultValue = \"${session}\", readonly = true, required = true)\n  private MavenSession session;\n  @Parameter(defaultValue = \"${mojoExecution}\", readonly = true, required = true)\n  private MojoExecution execution;\n  /**\n   * Flag to turn on support for module mode. Dependencies will not be added\n   * into GOPATH, go.mod files will be preprocessed to have replace links to\n   * each other locally. After processing all go.mod files are restored from\n   * backup. Can be overridden by property \"mvn.golang.module.mode\"\n   *\n   * @since 2.3.3\n   */\n  @Parameter(name = \"moduleMode\", defaultValue = \"false\")\n  private boolean moduleMode;\n  /**\n   * Path to be used as working directory for executing process, by default it\n   * is unset and working directory depends on mode and command.\n   *\n   * @since 2.3.3\n   */\n  @Parameter(name = \"workingDir\")\n  private String workingDir;\n  /**\n   * Flag shows that environment PATH variable should be filtered for footsteps\n   * of other go/bin folders to prevent conflicts.\n   *\n   * @since 2.3.0\n   */\n  @Parameter(defaultValue = \"true\", name = \"filterEnvPath\")\n  private boolean filterEnvPath = true;\n  /**\n   * Check hash for downloaded SDK archive.\n   *\n   * @since 2.3.0\n   */\n  @Parameter(name = \"checkSdkHash\", defaultValue = \"true\")\n  private boolean checkSdkHash = true;\n  /**\n   * Use proxy server defined for maven.\n   *\n   * @since 2.3.0\n   */\n  @Parameter(name = \"useMavenProxy\", defaultValue = \"true\")\n  private boolean useMavenProxy;\n  /**\n   * Disable check of SSL certificate during HTTPS request. Also can be changed\n   * by system property 'mvn.golang.disable.ssl.check'\n   *\n   * @since 2.1.7\n   */\n  @Parameter(name = \"disableSSLcheck\", defaultValue = \"false\")\n  private boolean disableSSLcheck;\n  /**\n   * Suppose SDK archive file name if it is not presented in the list loaded\n   * from server.\n   *\n   * @since 2.1.6\n   */\n  @Parameter(name = \"supposeSdkArchiveFileName\", defaultValue = \"true\")\n  private boolean supposeSdkArchiveFileName;\n  /**\n   * Parameters of proxy server to be used to make connection to SDK server.\n   *\n   * @since 2.1.1\n   */\n  @Parameter(name = \"proxy\")\n  private ProxySettings proxy;\n  /**\n   * Skip execution of the mojo. Also can be disabled through system property\n   * `mvn.golang.skip'\n   *\n   * @since 2.1.2\n   */\n  @Parameter(name = \"skip\", defaultValue = \"false\")\n  private boolean skip;\n  /**\n   * Ignore error exit code returned by GoLang tool and don't generate any\n   * failure.\n   *\n   * @since 2.1.1\n   */\n  @Parameter(name = \"ignoreErrorExitCode\", defaultValue = \"false\")\n  private boolean ignoreErrorExitCode;\n  /**\n   * Folder to place console logs.\n   *\n   * @since 2.1.1\n   */\n  @Parameter(name = \"reportsFolder\", defaultValue = \"${project.build.directory}${file.separator}reports\")\n  private String reportsFolder;\n  /**\n   * File to save console out log. If empty then will not be saved.\n   *\n   * @since 2.1.1\n   */\n  @Parameter(name = \"outLogFile\")\n  private String outLogFile;\n  /**\n   * File to save console error log. If empty then will not be saved\n   *\n   * @since 2.1.1\n   */\n  @Parameter(name = \"errLogFile\")\n  private String errLogFile;\n  /**\n   * Base site for SDK download. By default it uses\n   * <a href=\"https://storage.googleapis.com/golang/\">https://storage.googleapis.com/golang/</a>\n   */\n  @Parameter(name = \"sdkSite\", defaultValue = \"https://storage.googleapis.com/golang/\")\n  private String sdkSite;\n  /**\n   * Hide ASC banner.\n   */\n  @Parameter(defaultValue = \"true\", name = \"hideBanner\")\n  private boolean hideBanner;\n  /**\n   * Folder to be used to save and unpack loaded SDKs and also keep different\n   * info. By default it has value \"${user.home}${file.separator}.mvnGoLang\"\n   */\n  @Parameter(defaultValue = \"${user.home}${file.separator}.mvnGoLang\", name = \"storeFolder\")\n  private String storeFolder;\n  /**\n   * Folder to be used as $GOPATH. NB! By default it has value\n   * \"${user.home}${file.separator}.mvnGoLang${file.separator}.go_path\"\n   */\n  @Parameter(defaultValue = \"${user.home}${file.separator}.mvnGoLang${file.separator}.go_path\", name = \"goPath\")\n  private String goPath;\n  /**\n   * Value to be provided as $GO386. This controls the code generated by gc to\n   * use either the 387 floating-point unit (set to 387) or SSE2 instructions\n   * (set to sse2) for floating point computations.\n   *\n   * @since 2.1.7\n   */\n  private String target386;\n  /**\n   * Value to be provided as $GOARM. This sets the ARM floating point\n   * co-processor architecture version the run-time should target. If you are\n   * compiling on the target system, its value will be auto-detected.\n   *\n   * @since 2.1.1\n   */\n  @Parameter(name = \"targetArm\")\n  private String targetArm;\n  /**\n   * Folder to be used as $GOBIN. NB! By default it has value\n   * \"${project.build.directory}\". It is possible to disable usage of GOBIN in\n   * process through value <b>NONE</b>\n   */\n  @Parameter(defaultValue = \"${project.build.directory}\", name = \"goBin\")\n  private String goBin;\n  /**\n   * The Go SDK version. It plays role if goRoot is undefined. Can be defined\n   * through system property 'mvn.golang.go.version'\n   */\n  @Parameter(name = \"goVersion\", defaultValue = \"1.21.7\")\n  private String goVersion;\n  /**\n   * Cache directory to keep build data. It affects GOCACHE environment\n   * variable. By default it is turned off by value `off`\n   *\n   * @since 2.3.1\n   */\n  @Parameter(name = \"goCache\", defaultValue = \"${project.build.directory}${file.separator}.goBuildCache\")\n  private String goCache;\n  /**\n   * The Go home folder. It can be undefined and in the case the plug-in will\n   * make automatic business to find SDK in its cache or download it.\n   */\n  @Parameter(name = \"goRoot\")\n  private String goRoot;\n  /**\n   * The Go bootstrap home folder.\n   */\n  @Parameter(name = \"goRootBootstrap\")\n  private String goRootBootstrap;\n  /**\n   * Make GOPATH value as the last one in new generated GOPATH chain.\n   *\n   * @since 2.1.3\n   */\n  @Parameter(name = \"enforceGoPathToEnd\", defaultValue = \"false\")\n  private boolean enforceGoPathToEnd;\n  /**\n   * Sub-path to executing go tool in SDK folder.\n   *\n   * @since 1.1.0\n   */\n  @Parameter(name = \"execSubpath\", defaultValue = \"bin\")\n  private String execSubpath;\n  /**\n   * Go tool to be executed. NB! An Extension for OS will be automatically\n   * added.\n   *\n   * @since 1.1.0\n   */\n  @Parameter(name = \"exec\", defaultValue = \"go\")\n  private String exec;\n  /**\n   * Allows defined text to be printed before execution as warning in to log.\n   */\n  @Parameter(name = \"echoWarn\")\n  private String[] echoWarn;\n  /**\n   * Allows defined text to be printed before execution as info into log.\n   */\n  @Parameter(name = \"echo\")\n  private String[] echo;\n  /**\n   * Disable loading GoLang SDK through network if it is not found at cache.\n   */\n  @Parameter(name = \"disableSdkLoad\", defaultValue = \"false\")\n  private boolean disableSdkLoad;\n  /**\n   * GoLang source directory. By default <b>${project.build.sourceDirectory}</b>\n   */\n  @Parameter(defaultValue = \"${project.build.sourceDirectory}\", name = \"sources\")\n  private String sources;\n  /**\n   * The Target OS.\n   */\n  @Parameter(name = \"targetOs\")\n  private String targetOs;\n  /**\n   * The OS. If it is not defined then plug-in will try figure out the current\n   * one.\n   */\n  @Parameter(name = \"os\")\n  private String os;\n  /**\n   * The Target architecture.\n   */\n  @Parameter(name = \"targetArch\")\n  private String targetArch;\n  /**\n   * The Architecture. If it is not defined then plug-in will try figure out the\n   * current one.\n   */\n  @Parameter(name = \"arch\")\n  private String arch;\n  /**\n   * Version of OSX to be used during distributive name synthesis.\n   */\n  @Parameter(name = \"osxVersion\")\n  private String osxVersion;\n  /**\n   * List of optional build flags.\n   */\n  @Parameter(name = \"buildFlags\")\n  private String[] buildFlags;\n  /**\n   * Be verbose in logging.\n   */\n  @Parameter(name = \"verbose\", defaultValue = \"false\")\n  private boolean verbose;\n  /**\n   * Do not delete SDK archive after unpacking.\n   */\n  @Parameter(name = \"keepSdkArchive\", defaultValue = \"false\")\n  private boolean keepSdkArchive;\n  /**\n   * Name of tool to be called instead of standard 'go' tool.\n   */\n  @Parameter(name = \"useGoTool\")\n  private String useGoTool;\n  /**\n   * Flag to override all provided configuration variables by their environment\n   * values if such value is detected\n   * <ul>\n   * <li>goRoot by $GOROOT</li>\n   * <li>goRootBootstrap by $GOROOT_BOOTSTRAP</li>\n   * <li>targetOs by $GOOS</li>\n   * <li>targetArch by $GOARCH</li>\n   * <li>targetArm by $GOARM</li>\n   * <li>goPath by $GOPATH</li>\n   * </ul>\n   * <b>NB! Your configuration values will be ignored if you define the flag\n   * because it has higher priority!</b>\n   */\n  @Parameter(name = \"useEnvVars\", defaultValue = \"false\")\n  private boolean useEnvVars;\n  /**\n   * It allows to define key value pairs which will be used as environment\n   * variables for started GoLang process.\n   */\n  @Parameter(name = \"env\")\n  private Map<?, ?> env;\n  /**\n   * Allows directly define name of SDK archive. If it is not defined then\n   * plug-in will try to generate name and find such one in downloaded SDK\n   * list..\n   */\n  @Parameter(name = \"sdkArchiveName\")\n  private String sdkArchiveName;\n  /**\n   * Directly defined URL to download GoSDK. In the case SDK list will not be\n   * downloaded and plug-in will try download archive through the link.\n   */\n  @Parameter(name = \"sdkDownloadUrl\")\n  private String sdkDownloadUrl;\n  /**\n   * Timeout for HTTP connection in milliseconds.\n   *\n   * @since 2.3.0\n   */\n  @Parameter(name = \"connectionTimeout\", defaultValue = \"60000\")\n  private int connectionTimeout = 60000;\n  /**\n   * Keep unpacked wrongly SDK folder.\n   */\n  @Parameter(name = \"keepUnarchFolderIfError\", defaultValue = \"false\")\n  private boolean keepUnarchFolderIfError;\n  /**\n   * Allows to define folders which will be added into $GOPATH\n   *\n   * @since 2.0.0\n   */\n  @Parameter(name = \"addToGoPath\")\n  private String[] addToGoPath;\n  @LazyInited\n  private CloseableHttpClient httpClient;\n  @LazyInited\n  private ByteArrayOutputStream consoleErrBuffer;\n  @LazyInited\n  private ByteArrayOutputStream consoleOutBuffer;\n\n  @Nonnull\n  private static String ensureNoSurroundingSlashes(@Nonnull final String str) {\n    String result = str;\n    if (!result.isEmpty() && (result.charAt(0) == '/' || result.charAt(0) == '\\\\')) {\n      result = result.substring(1);\n    }\n    if (!result.isEmpty() &&\n        (result.charAt(result.length() - 1) == '/' || result.charAt(result.length() - 1) == '\\\\')) {\n      result = result.substring(0, result.length() - 1);\n    }\n    return result;\n  }\n\n  private static void deleteFileIfExists(@Nonnull final File file) throws IOException {\n    if (file.isFile() && !file.delete()) {\n      throw new IOException(\"Can't delete file : \" + file);\n    }\n  }\n\n  private static boolean isSafeEmpty(@Nullable final String value) {\n    return value == null || value.isEmpty();\n  }\n\n  @Nonnull\n  private static String extractExtensionOfArchive(@Nonnull final String archiveName) {\n    final String lcName = archiveName.toLowerCase(Locale.ENGLISH);\n    final String result;\n    if (lcName.endsWith(\".tar.gz\")) {\n      result = archiveName.substring(archiveName.length() - \"tar.gz\".length());\n    } else {\n      result = FilenameUtils.getExtension(archiveName);\n    }\n    return result;\n  }\n\n  @Nonnull\n  protected static String adaptExecNameForOS(@Nonnull final String execName) {\n    return execName + (SystemUtils.IS_OS_WINDOWS ? \".exe\" : \"\");\n  }\n\n  @Nonnull\n  private static String getPathToFolder(@Nonnull final String path) {\n    String text = path;\n    if (!text.endsWith(\"/\") && !text.endsWith(\"\\\\\")) {\n      text = text + File.separatorChar;\n    }\n    return text;\n  }\n\n  @Nonnull\n  private static String getPathToFolder(@Nonnull final File path) {\n    return getPathToFolder(path.getAbsolutePath());\n  }\n\n  @Nullable\n  protected static File findExisting(@Nonnull @MayContainNull final File... files) {\n    File result = null;\n    for (final File f : files) {\n      if (f != null && f.isFile()) {\n        result = f;\n        break;\n      }\n    }\n    return result;\n  }\n\n  @Nonnull\n  private static String removeSrcFolderAtEndIfPresented(@Nonnull final String text) {\n    String result = text;\n    if (text.endsWith(\"/src\") || text.endsWith(\"\\\\src\")) {\n      result = text.substring(0, text.length() - 4);\n    }\n    return result;\n  }\n\n  @Nonnull\n  private static String extractComputerName() {\n    String result = System.getenv(\"COMPUTERNAME\");\n    if (result == null) {\n      result = System.getenv(\"HOSTNAME\");\n    }\n    if (result == null) {\n      try {\n        result = InetAddress.getLocalHost().getHostName();\n      } catch (UnknownHostException ex) {\n        // do nothing, let be null\n      }\n    }\n    return GetUtils.ensureNonNull(result, \"<Unknown computer>\");\n  }\n\n  @Nonnull\n  private static String extractDomainName() {\n    final String result = System.getenv(\"USERDOMAIN\");\n    return GetUtils.ensureNonNull(result, \"\");\n  }\n\n  private static boolean tryRenameFolder(@Nonnull final File sourceFolder, @Nonnull final File targetFolder,\n                                         final int attempts, final long retryDelayMs) {\n    boolean result = false;\n    for (int i = 0; i < attempts && !result; i++) {\n      result = sourceFolder.renameTo(targetFolder);\n      if (!result && i < attempts - 1) {\n        try {\n          Thread.sleep(retryDelayMs);\n        } catch (InterruptedException ex) {\n          Thread.currentThread().interrupt();\n          return false;\n        }\n      }\n    }\n    return result;\n  }\n\n  @Nullable\n  private static String nullIfBlank(@Nullable final String text) {\n    return text == null || text.trim().isEmpty() ? null : text;\n  }\n\n  @Nullable\n  public final String getWorkingDir() {\n    return this.workingDir;\n  }\n\n  public final void setWorkingDir(@Nullable final String path) {\n    this.workingDir = path;\n  }\n\n  public boolean isModuleMode() {\n    return Boolean\n        .parseBoolean(findMvnProperty(\"mvn.golang.module.mode\", Boolean.toString(this.moduleMode)));\n  }\n\n  public void setModuleMode(final boolean value) {\n    this.moduleMode = value;\n  }\n\n  @Nonnull\n  public ArtifactResolver getArtifactResolver() {\n    return assertNotNull(\"Artifact resolver component is not provided by Maven\",\n        this.artifactResolver);\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  public List<ArtifactRepository> getRemoteRepositories() {\n    return this.remoteRepositories;\n  }\n\n  protected boolean doesNeedSessionLock() {\n    return false;\n  }\n\n  /**\n   * Generate unique file name in bounds current maven session.\n   *\n   * @return file name, must not be null\n   * @since 2.3.3\n   */\n  @Nonnull\n  private String makeSessionLockFileName() {\n    final String id =\n        Long.toHexString(this.getSession().getStartTime().getTime()).toUpperCase(Locale.ENGLISH);\n    return \".#mvn.go.session.lock.\" + id;\n  }\n\n  @Nonnull\n  protected File getTempFileFolder() {\n    return new File(System.getProperty(\"java.io.tmpdir\"));\n  }\n\n  /**\n   * Internal method to generate session locking file for mvn-golang mojo. If\n   * file exists then it will be waiting for its removing to create new one.\n   *\n   * @throws MojoExecutionException it will be thrown if any error in process\n   * @since 2.3.3\n   */\n  private void lockMvnGolangSession() throws MojoExecutionException {\n    final File lockFile = new File(this.getTempFileFolder(), makeSessionLockFileName());\n\n    this.getLog().debug(\"Locking project for mvn-golang sync processing, locker file: \" + lockFile);\n    while (!Thread.currentThread().isInterrupted()) {\n      final boolean locked;\n\n      try {\n        locked = lockFile.createNewFile();\n      } catch (IOException ex) {\n        throw new MojoExecutionException(\n            \"Detected error during attempt to make locker file: \" + lockFile, ex);\n      }\n\n      if (locked) {\n        lockFile.deleteOnExit();\n        this.getLog().debug(\"Locking file created: \" + lockFile);\n        return;\n      } else {\n        try {\n          Thread.sleep(100);\n        } catch (InterruptedException ex) {\n          Thread.currentThread().interrupt();\n          break;\n        }\n      }\n    }\n  }\n\n  /**\n   * Internal method to unlock current mvn-golang session through removing of\n   * the locking file. If file can't be found then it warns and continue work as\n   * if it would be removed.\n   *\n   * @throws MojoExecutionException it is thrown if any error\n   * @since 2.3.3\n   */\n  private void unlockMvnGolangSession() throws MojoExecutionException {\n    final File locker = new File(this.getTempFileFolder(), makeSessionLockFileName());\n\n    this.getLog().debug(\"Unlocking project for mvn-golang sync processing, locker file: \" + locker);\n    if (locker.isFile()) {\n      if (!locker.delete()) {\n        throw new MojoExecutionException(\"Can't delete locker file: \" + locker);\n      }\n    } else {\n      this.getLog().warn(\"Can't detect locker file, may be it was removed externally: \" + locker);\n    }\n  }\n\n  @Nonnull\n  private File loadSDKAndUnpackIntoCache(\n      @Nullable final ProxySettings proxySettings,\n      @Nonnull final File cacheFolder,\n      @Nonnull final String baseSdkName,\n      final boolean notLoadIfNotInCache\n  ) throws IOException, MojoExecutionException {\n    synchronized (AbstractGolangMojo.class) {\n      final File sdkFolder = new File(cacheFolder, baseSdkName);\n\n      if (sdkFolder.isDirectory()) {\n        return sdkFolder;\n      }\n\n      final File lockFile = new File(cacheFolder, \".lck\" + baseSdkName);\n      lockFile.deleteOnExit();\n      try {\n        if (!lockFile.createNewFile()) {\n          this.getLog().info(\"Detected SDK loading, waiting for the process end\");\n          while (lockFile.exists()) {\n            try {\n              Thread.sleep(100L);\n            } catch (InterruptedException ex) {\n              throw new IOException(\"Wait of SDK loading is interrupted\", ex);\n            }\n          }\n          this.getLog().info(\"Loading process has been completed\");\n          return sdkFolder;\n        }\n\n        if (sdkFolder.isDirectory()) {\n          if (this.isVerbose() || this.getLog().isDebugEnabled()) {\n            this.getLog().info(\"SDK cache folder : \" + sdkFolder);\n          }\n          return sdkFolder;\n        } else if (notLoadIfNotInCache || this.session.isOffline()) {\n          this.getLog().error(\n              \"Can't find cached Golang SDK and downloading is disabled or Maven in offline mode\");\n          throw new IOException(\n              \"Can't find \" + baseSdkName + \" in the cache but loading is directly disabled\");\n        }\n\n        final String predefinedLink = this.getSdkDownloadUrl();\n\n        final File archiveFile;\n        final String linkForDownloading;\n\n        if (isSafeEmpty(predefinedLink)) {\n          this.logOptionally(\"There is not any predefined SDK URL\");\n          final String sdkFileName = this.findSdkArchiveFileName(proxySettings, baseSdkName);\n          archiveFile = new File(cacheFolder, sdkFileName);\n          linkForDownloading = this.getSdkSite() + sdkFileName;\n        } else {\n          final String extension = extractExtensionOfArchive(assertNotNull(predefinedLink));\n          archiveFile = new File(cacheFolder, baseSdkName + '.' + extension);\n          linkForDownloading = predefinedLink;\n          this.logOptionally(\"Using predefined URL to download SDK : \" + linkForDownloading);\n          this.logOptionally(\"Detected extension of archive : \" + extension);\n        }\n\n        if (archiveFile.exists()) {\n          this.logOptionally(\n              \"Detected existing archive \" + archiveFile + \", deleting it and reload\");\n          if (!archiveFile.delete()) {\n            throw new IOException(\"Can't delete archive file: \" + archiveFile);\n          }\n        }\n\n        final HttpGet methodGet = new HttpGet(linkForDownloading);\n        final RequestConfig config =\n            this.processRequestConfig(proxySettings, this.getConnectionTimeout(),\n                RequestConfig.custom()).build();\n        methodGet.setConfig(config);\n\n        boolean errorsDuringLoading = true;\n        boolean showProgressBar;\n\n        try {\n          if (!archiveFile.isFile()) {\n            this.getLog().warn(\"Loading SDK archive with URL : \" + linkForDownloading);\n\n            final HttpResponse response = this.getHttpClient(proxySettings).execute(methodGet);\n            final StatusLine statusLine = response.getStatusLine();\n\n            this.getLog().debug(\"HttpResponse: \" + response);\n\n            if (statusLine.getStatusCode() != HttpStatus.SC_OK) {\n              throw new IOException(String\n                  .format(\"Can't load SDK archive from %s : %d %s\", linkForDownloading,\n                      statusLine.getStatusCode(), statusLine.getReasonPhrase()));\n            }\n\n            final XGoogHashHeader xGoogHash =\n                new XGoogHashHeader(response.getHeaders(\"x-goog-hash\"));\n            this.getLog().debug(\"XGoogHashHeader: \" + xGoogHash);\n\n            final HttpEntity entity = response.getEntity();\n            final Header contentType = entity.getContentType();\n\n            if (!ALLOWED_SDKARCHIVE_CONTENT_TYPE.contains(contentType.getValue())) {\n              throw new IOException(\"Unsupported content type : \" + contentType.getValue());\n            }\n\n            final long size = entity.getContentLength();\n            try (final InputStream inStream = entity.getContent()) {\n              showProgressBar = size > 0L && !this.session.isParallel();\n              this.getLog().info(\"Downloading SDK archive into file : \" + archiveFile);\n              long loadedCounter = 0L;\n              final byte[] buffer = new byte[1024 * 1024];\n              int lastRenderedValue = -1;\n              final int PROGRESSBAR_WIDTH = 10;\n              final String LOADING_TITLE = \"Loading \" + size / (1024L * 1024L) + \" Mb \";\n              if (showProgressBar) {\n                lastRenderedValue = IOUtils\n                    .printTextProgressBar(LOADING_TITLE, 0, size, PROGRESSBAR_WIDTH,\n                        lastRenderedValue);\n              }\n              final OutputStream fileOutStream =\n                  new BufferedOutputStream(new FileOutputStream(archiveFile), 128 * 16384);\n              try {\n                while (!Thread.currentThread().isInterrupted()) {\n                  final int readCounter = inStream.read(buffer);\n                  if (readCounter < 0) {\n                    break;\n                  }\n                  fileOutStream.write(buffer, 0, readCounter);\n                  loadedCounter += readCounter;\n                  if (showProgressBar) {\n                    lastRenderedValue = IOUtils\n                        .printTextProgressBar(LOADING_TITLE, loadedCounter, size, PROGRESSBAR_WIDTH,\n                            lastRenderedValue);\n                  }\n                }\n              } finally {\n                if (showProgressBar) {\n                  System.out.println();\n                }\n                IOUtils.closeSilently(fileOutStream);\n              }\n              if (Thread.currentThread().isInterrupted()) {\n                throw new MojoExecutionException(\"Interrupted\");\n              }\n              this.getLog().info(\"Archived SDK has been succesfully downloaded, its size is \" +\n                  (archiveFile.length() / 1024L) + \" Kb\");\n            }\n\n            if (this.isCheckSdkHash()) {\n              if (xGoogHash.isValid() && xGoogHash.hasData()) {\n                this.getLog().debug(\"Checking hash of file\");\n                final boolean fileHashOk = xGoogHash.isFileOk(this.getLog(), archiveFile);\n                if (fileHashOk) {\n                  this.getLog().info(\"Downloaded archive file hash is OK\");\n                } else {\n                  this.getLog().error(\"Downloaded archive file hash is BAD\");\n                  throw new MojoExecutionException(\"Downloaded SDK archive has wrong hash\");\n                }\n              } else {\n                if (!xGoogHash.isValid()) {\n                  throw new MojoExecutionException(\n                      \"Couldn't parse x-goog-hash from response: \" + response);\n                } else {\n                  throw new MojoExecutionException(\n                      \"Parsed x-goog-hash doesn't contain data but marked as valid one: \" +\n                          xGoogHash);\n                }\n              }\n            }\n\n          } else {\n            this.getLog().info(\"Archive file of SDK has been found in the cache : \" + archiveFile);\n          }\n\n          errorsDuringLoading = false;\n\n          final File interFolder =\n              this.unpackArchToFolder(archiveFile, \"go\", new File(cacheFolder, \".#\" + baseSdkName));\n\n          this.getLog().info(\"Renaming \" + interFolder.getName() + \" to \" + sdkFolder.getName());\n\n          if (tryRenameFolder(interFolder, sdkFolder, 3, 5000L)) {\n            this.logOptionally(\"Renamed successfully: \" + interFolder + \" -> \" + sdkFolder);\n          } else {\n            throw new IOException(\n                \"Can't rename temp GoSDK folder: \" + interFolder + \" -> \" + sdkFolder);\n          }\n\n          return sdkFolder;\n        } finally {\n          methodGet.releaseConnection();\n          if (errorsDuringLoading || !this.isKeepSdkArchive()) {\n            this.logOptionally(\"Deleting archive : \" + archiveFile +\n                (errorsDuringLoading ? \" (because error during loading)\" : \"\"));\n            deleteFileIfExists(archiveFile);\n          } else {\n            this.logOptionally(\"Archive file is kept for special flag : \" + archiveFile);\n          }\n        }\n      } finally {\n        final boolean deleted = FileUtils.deleteQuietly(lockFile);\n        this.getLog().debug(\"Lock file \" + lockFile + \" deleted : \" + deleted);\n      }\n    }\n  }\n\n  public boolean isFilterEnvPath() {\n    return this.filterEnvPath;\n  }\n\n  @Nullable\n  protected String findMvnProperty(@Nonnull final String key, @Nullable final String dflt) {\n    if (this.session == null || this.project == null) {\n      return null;\n    }\n    return findProperty(this.session, this.project, key, dflt);\n  }\n\n  public boolean isSkip() {\n    final boolean result =\n        Boolean.parseBoolean(findMvnProperty(\"mvn.golang.skip\", Boolean.toString(this.skip)));\n\n    final String skipMojoSuffix = this.getSkipMojoPropertySuffix();\n    return skipMojoSuffix == null ? result : result\n        || Boolean.parseBoolean(\n        findMvnProperty(String.format(\"mvn.golang.%s.skip\", skipMojoSuffix), \"false\"));\n  }\n\n  public boolean isEnforceGoPathToEnd() {\n    return this.enforceGoPathToEnd;\n  }\n\n  @Nonnull\n  public MavenProject getProject() {\n    return this.project;\n  }\n\n  @Nonnull\n  public MojoExecution getExecution() {\n    return this.execution;\n  }\n\n  @Nonnull\n  public MavenSession getSession() {\n    return this.session;\n  }\n\n  public boolean isIgnoreErrorExitCode() {\n    return this.ignoreErrorExitCode;\n  }\n\n  @Nonnull\n  public Map<?, ?> getEnv() {\n    return GetUtils.ensureNonNull(this.env, Collections.EMPTY_MAP);\n  }\n\n  @Nullable\n  public String getSdkDownloadUrl() {\n    return this.sdkDownloadUrl;\n  }\n\n  @Nonnull\n  public String getExecSubpath() {\n    return ensureNoSurroundingSlashes(assertNotNull(this.execSubpath));\n  }\n\n  public int getConnectionTimeout() {\n    return this.connectionTimeout;\n  }\n\n  @Nonnull\n  public String getExec() {\n    return ensureNoSurroundingSlashes(assertNotNull(this.exec));\n  }\n\n  public boolean isUseEnvVars() {\n    return this.useEnvVars;\n  }\n\n  public boolean isKeepSdkArchive() {\n    return this.keepSdkArchive;\n  }\n\n  public boolean isKeepUnarchFolderIfError() {\n    return this.keepUnarchFolderIfError;\n  }\n\n  @Nullable\n  public String getSdkArchiveName() {\n    return this.sdkArchiveName;\n  }\n\n  @Nonnull\n  public String getReportsFolder() {\n    return this.reportsFolder;\n  }\n\n  @Nullable\n  public String getOutLogFile() {\n    return this.outLogFile;\n  }\n\n  @Nullable\n  public String getErrLogFile() {\n    return this.errLogFile;\n  }\n\n  public boolean isCheckSdkHash() {\n    return this.checkSdkHash;\n  }\n\n  @Nonnull\n  public String getStoreFolder() {\n    return this.storeFolder;\n  }\n\n  @Nullable\n  public String getUseGoTool() {\n    return this.useGoTool;\n  }\n\n  public boolean isVerbose() {\n    return Boolean\n        .parseBoolean(findMvnProperty(\"mvn.golang.verbose\", Boolean.toString(this.verbose)));\n  }\n\n  public boolean isDisableSdkLoad() {\n    return this.disableSdkLoad;\n  }\n\n  @Nonnull\n  public String getSdkSite() {\n    return assertNotNull(this.sdkSite);\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  public String[] getBuildFlags() {\n    final List<String> result = new ArrayList<>();\n    for (final String s : ArrayUtils\n        .joinArrays(GetUtils.ensureNonNull(this.buildFlags, ArrayUtils.EMPTY_STRING_ARRAY),\n            getExtraBuildFlags())) {\n      if (!this.buildFlagsToIgnore.contains(s)) {\n        result.add(s);\n      }\n    }\n\n    result.addAll(this.tempBuildFlags);\n\n    return result.toArray(new String[0]);\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  protected String[] getExtraBuildFlags() {\n    return ArrayUtils.EMPTY_STRING_ARRAY;\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  public File[] findGoPath(final boolean ensureExist) throws IOException {\n    LOCKER.lock();\n    try {\n      final String foundGoPath = getGoPath();\n      if (getLog().isDebugEnabled()) {\n        getLog().debug(\"findGoPath(\" + ensureExist + \"), getGoPath() returns \" + foundGoPath);\n      }\n\n      final List<File> result = new ArrayList<>();\n\n      for (final String p : foundGoPath.split(String.format(\"\\\\%s\", File.pathSeparator))) {\n        final File folder = new File(p);\n        result.add(folder);\n        if (ensureExist && !folder.isDirectory() && !folder.mkdirs()) {\n          throw new IOException(\"Can't create folder for GOPATH : \" + folder.getAbsolutePath());\n        }\n      }\n\n      return result.toArray(new File[0]);\n    } finally {\n      LOCKER.unlock();\n    }\n  }\n\n  @Nullable\n  public File findGoRootBootstrap(final boolean ensureExist) throws IOException {\n    LOCKER.lock();\n    try {\n      final String value = getGoRootBootstrap();\n      File result = null;\n      if (value != null) {\n        result = new File(value);\n        if (ensureExist && !result.isDirectory()) {\n          throw new IOException(\"Can't find folder for GOROOT_BOOTSTRAP: \" + result);\n        }\n      }\n      return result;\n    } finally {\n      LOCKER.unlock();\n    }\n  }\n\n  @Nonnull\n  public String getOs() {\n    String result = this.os;\n    if (isSafeEmpty(result)) {\n      if (isSafeEmpty(result)) {\n        result = assertNotNull(String.format(\"Can't recognize OS: %s\", SystemUtils.OS_NAME),\n            SysUtils.findGoSdkOsType());\n      }\n    }\n    return result;\n  }\n\n  @Nullable\n  public String getArch() {\n    String result = this.arch;\n    if (isSafeEmpty(result)) {\n      result = assertNotNull(String.format(\"Can't recognize ARCH: %s\", SystemUtils.OS_ARCH),\n          SysUtils.decodeGoSdkArchType(SystemUtils.OS_ARCH));\n    }\n    return result;\n  }\n\n  @Nullable\n  private String getValueOrEnv(@Nonnull final String varName, @Nullable final String configValue) {\n    final String foundInEnvironment = System.getenv(varName);\n    String result = configValue;\n\n    if (foundInEnvironment != null && isUseEnvVars()) {\n      if (!isSafeEmpty(configValue)) {\n        getLog().warn(String.format(\"Value %s is replaced by environment value.\", varName));\n      }\n      result = foundInEnvironment;\n    }\n    return result;\n  }\n\n  @Nullable\n  public String getGoRoot() {\n    return getValueOrEnv(\"GOROOT\", this.goRoot);\n  }\n\n  @Nullable\n  public String getGoCache() {\n    return getValueOrEnv(\"GOCACHE\", this.goCache);\n  }\n\n  @Nullable\n  public String getGoRootBootstrap() {\n    return getValueOrEnv(\"GOROOT_BOOTSTRAP\", this.goRootBootstrap);\n  }\n\n  @Nullable\n  public String getGoBin() {\n    String result = getValueOrEnv(\"GOBIN\", this.goBin);\n    return \"NONE\".equals(result) ? null : result;\n  }\n\n  @Nonnull\n  public String getGoPath() {\n    return assertNotNull(getValueOrEnv(\"GOPATH\", this.goPath));\n  }\n\n  @Nullable\n  public String getTargetArm() {\n    return getValueOrEnv(\"GOARM\", this.targetArm);\n  }\n\n  @Nullable\n  public String getTarget386() {\n    return getValueOrEnv(\"GO386\", this.target386);\n  }\n\n  @Nullable\n  public String getTargetOS() {\n    return getValueOrEnv(\"GOOS\", this.targetOs);\n  }\n\n  @Nullable\n  public String getTargetArch() {\n    return getValueOrEnv(\"GOARCH\", this.targetArch);\n  }\n\n  public boolean isUseMavenProxy() {\n    return this.useMavenProxy;\n  }\n\n  public boolean getSupposeSdkArchiveFileName() {\n    return this.supposeSdkArchiveFileName;\n  }\n\n  public boolean isDisableSslCheck() {\n    return this.disableSSLcheck || Boolean.parseBoolean(\n        findProperty(this.getSession(), this.getProject(), \"mvn.golang.disable.ssl.check\",\n            \"false\"));\n  }\n\n  public void setDisableSslCheck(final boolean flag) {\n    this.disableSSLcheck = flag;\n  }\n\n  @Nullable\n  public ProxySettings getProxy() {\n    return this.proxy;\n  }\n\n  @Nullable\n  public String getOSXVersion() {\n    return this.osxVersion;\n  }\n\n  @Nonnull\n  public String getGoVersion() {\n    return findProperty(this.session, this.project, \"mvn.golang.go.version\", this.goVersion);\n  }\n\n  @Nonnull\n  public File getSources(final boolean ensureExist) throws IOException {\n    final File result = new File(this.sources);\n    if (ensureExist && !result.isDirectory()) {\n      throw new IOException(\"Can't find GoLang project sources : \" + result);\n    }\n    return result;\n  }\n\n  protected void addTmpBuildFlagIfNotPresented(@Nonnull @MustNotContainNull final String... flags) {\n    for (final String s : flags) {\n      if (this.tempBuildFlags.contains(s)) {\n        continue;\n      }\n      boolean found = false;\n      if (this.buildFlags != null) {\n        for (final String b : this.buildFlags) {\n          if (s.equals(b)) {\n            found = true;\n            break;\n          }\n        }\n      }\n      if (!found) {\n        this.tempBuildFlags.add(s);\n      }\n    }\n  }\n\n  @Nullable\n  private ProxySettings extractProxySettings() {\n    final ProxySettings result;\n    if (this.isUseMavenProxy()) {\n      final Proxy activeMavenProxy = this.settings == null ? null : this.settings.getActiveProxy();\n      result = activeMavenProxy == null ? null : new ProxySettings(activeMavenProxy);\n      getLog().debug(\"Detected maven proxy : \" + result);\n    } else {\n      result = this.proxy;\n      if (result != null) {\n        getLog().debug(\"Defined proxy : \" + result);\n      }\n    }\n    return result;\n  }\n\n  @ReturnsOriginal\n  @Nonnull\n  private RequestConfig.Builder processRequestConfig(@Nullable final ProxySettings proxySettings,\n                                                     final int timeout,\n                                                     @Nonnull final RequestConfig.Builder config) {\n    this.getLog()\n        .debug(\"Connection(timeout=\" + timeout + \"ms, proxySettings=\" + proxySettings + ')');\n    if (proxySettings != null) {\n      final HttpHost proxyHost =\n          new HttpHost(proxySettings.host, proxySettings.port, proxySettings.protocol);\n      config.setProxy(proxyHost);\n    }\n    return config.setConnectTimeout(timeout).setSocketTimeout(timeout);\n  }\n\n  @Nonnull\n  private String loadGoLangSdkList(@Nullable final ProxySettings proxySettings,\n                                   @Nullable final String keyPrefix)\n      throws IOException, MojoExecutionException {\n    final String sdksite = getSdkSite() + (keyPrefix == null ? \"\" : \"?prefix=\" + keyPrefix);\n\n    getLog().warn(\"Loading list of available GoLang SDKs from \" + sdksite);\n    final HttpGet get = new HttpGet(sdksite);\n\n    final RequestConfig config =\n        processRequestConfig(proxySettings, this.getConnectionTimeout(), RequestConfig.custom())\n            .build();\n    get.setConfig(config);\n\n    get.addHeader(\"Accept\", \"application/xml\");\n\n    try {\n      final HttpResponse response = getHttpClient(proxySettings).execute(get);\n      final StatusLine statusLine = response.getStatusLine();\n      if (statusLine.getStatusCode() == HttpStatus.SC_OK) {\n        final String content = EntityUtils.toString(response.getEntity());\n        getLog().info(\"GoLang SDK list has been loaded successfuly\");\n        getLog().debug(content);\n        return content;\n      } else {\n        throw new IOException(String\n            .format(\"Can't load list of SDKs from %s : %d %s\", sdksite, statusLine.getStatusCode(),\n                statusLine.getReasonPhrase()));\n      }\n    } finally {\n      get.releaseConnection();\n    }\n  }\n\n  @Nonnull\n  private Document convertSdkListToDocument(@Nonnull final String sdkListAsString)\n      throws IOException {\n    try {\n      final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n      final DocumentBuilder builder = factory.newDocumentBuilder();\n      return builder.parse(new InputSource(new StringReader(sdkListAsString)));\n    } catch (ParserConfigurationException ex) {\n      getLog().error(\"Can't configure XML parser\", ex);\n      throw new IOException(\"Can't configure XML parser\", ex);\n    } catch (SAXException ex) {\n      getLog().error(\"Can't parse document\", ex);\n      throw new IOException(\"Can't parse document\", ex);\n    } catch (IOException ex) {\n      getLog().error(\"Unexpected IOException\", ex);\n      throw new IOException(\"Unexpected IOException\", ex);\n    }\n  }\n\n  private void printEcho() {\n    if (this.echoWarn != null) {\n      for (final String s : this.echoWarn) {\n        getLog().warn(s);\n      }\n    }\n\n    if (this.echo != null) {\n      for (final String s : this.echo) {\n        getLog().info(s);\n      }\n    }\n  }\n\n  protected void logOptionally(@Nonnull final String message) {\n    if (getLog().isDebugEnabled() || this.verbose) {\n      getLog().info(message);\n    }\n  }\n\n  protected void initConsoleBuffers() {\n    getLog().debug(\"Initing console out and console err buffers\");\n    this.consoleErrBuffer = new ByteArrayOutputStream();\n    this.consoleOutBuffer = new ByteArrayOutputStream();\n  }\n\n  @ReturnsOriginal\n  @Nonnull\n  private File unpackArchToFolder(@Nonnull final File archiveFile,\n                                  @Nonnull final String folderInArchive,\n                                  @Nonnull final File destinationFolder) throws IOException {\n    getLog().info(String.format(\"Unpacking archive %s to folder %s\", archiveFile.getName(),\n        destinationFolder.getName()));\n\n    boolean detectedError = true;\n    try {\n\n      final int unpackedFileCounter = UnpackUtils\n          .unpackFileToFolder(getLog(), folderInArchive, archiveFile, destinationFolder, true);\n      if (unpackedFileCounter == 0) {\n        throw new IOException(\n            \"Couldn't find folder '\" + folderInArchive + \"' in archive or the archive is empty\");\n      } else {\n        getLog().info(\"Unpacked \" + unpackedFileCounter + \" file(s)\");\n      }\n\n      detectedError = false;\n\n    } finally {\n      if (detectedError && !isKeepUnarchFolderIfError()) {\n        logOptionally(\"Deleting folder because error during unpack : \" + destinationFolder);\n        FileUtils.deleteQuietly(destinationFolder);\n      }\n    }\n    return destinationFolder;\n  }\n\n  @Nonnull\n  private String extractSDKFileName(@Nonnull final String listUrl, @Nonnull final Document doc,\n                                    @Nonnull final String sdkBaseName,\n                                    @Nonnull @MustNotContainNull final String[] allowedExtensions)\n      throws IOException {\n    getLog().debug(\"Looking for SDK started with base name : \" + sdkBaseName);\n\n    final Set<String> variants = new HashSet<>();\n    for (final String ext : allowedExtensions) {\n      variants.add(sdkBaseName + '.' + ext);\n    }\n\n    final List<String> listedSdk = new ArrayList<>();\n\n    final Element root = doc.getDocumentElement();\n    if (\"ListBucketResult\".equals(root.getTagName())) {\n      final NodeList list = root.getElementsByTagName(\"Contents\");\n      for (int i = 0; i < list.getLength(); i++) {\n        final Element element = (Element) list.item(i);\n        final NodeList keys = element.getElementsByTagName(\"Key\");\n        if (keys.getLength() > 0) {\n          final String text = keys.item(0).getTextContent();\n          if (variants.contains(text)) {\n            logOptionally(\"Detected compatible SDK in the SDK list : \" + text);\n            return text;\n          } else {\n            listedSdk.add(text);\n          }\n        }\n      }\n\n      if (this.supposeSdkArchiveFileName) {\n        final String supposedSdkName =\n            sdkBaseName + '.' + (SystemUtils.IS_OS_WINDOWS ? \"zip\" : \"tar.gz\");\n        getLog().warn(\"Can't find SDK file in the loaded list\");\n        getLog().debug(\"..................................................\");\n        for (final String s : listedSdk) {\n          getLog().debug(s);\n        }\n        getLog().debug(\"..................................................\");\n\n        getLog().warn(\"Supposed name of SDK archive is \" + supposedSdkName +\n            \", trying to load it directly! It can be disabled with <supposeSdkArchiveFileName>false</supposeSdkArchiveFileName>)\");\n        return supposedSdkName;\n      }\n\n      getLog().error(\"Can't find any SDK to be used as \" + sdkBaseName);\n      getLog().error(\"GoLang list contains listed SDKs (\" + listUrl + \")\");\n      getLog().error(\n          \"It is possible directly define link to SDK through configuration parameter <sdkDownloadUrl>..</sdkDownloadUrl>\");\n      getLog().error(\"..................................................\");\n      for (final String s : listedSdk) {\n        getLog().error(s);\n      }\n\n      throw new IOException(\"Can't find SDK : \" + sdkBaseName);\n    } else {\n      throw new IOException(\"It is not a ListBucket file [\" + root.getTagName() + ']');\n    }\n  }\n\n  @Nonnull\n  private String findSdkArchiveFileName(@Nullable final ProxySettings proxySettings,\n                                        @Nonnull final String sdkBaseName)\n      throws IOException, MojoExecutionException {\n    String result = getSdkArchiveName();\n    if (isSafeEmpty(result)) {\n      final Document parsed = convertSdkListToDocument(\n          loadGoLangSdkList(proxySettings, URLEncoder.encode(sdkBaseName, \"UTF-8\")));\n      result =\n          extractSDKFileName(getSdkSite(), parsed, sdkBaseName, new String[] {\"tar.gz\", \"zip\"});\n    } else {\n      getLog().info(\"SDK archive name is predefined : \" + result);\n    }\n    return GetUtils.ensureNonNullStr(result);\n  }\n\n  private void warnIfContainsUC(@Nonnull final String message, @Nonnull final String str) {\n    boolean detected = false;\n    for (final char c : str.toCharArray()) {\n      if (Character.isUpperCase(c)) {\n        detected = true;\n        break;\n      }\n    }\n    if (detected) {\n      getLog().warn(message + \" : \" + str);\n    }\n  }\n\n  @Nonnull\n  protected File findGoRoot(@Nullable final ProxySettings proxySettings)\n      throws IOException, MojoFailureException, MojoExecutionException {\n    final File result;\n    LOCKER.lock();\n    try {\n      final String predefinedGoRoot = this.getGoRoot();\n\n      if (isSafeEmpty(predefinedGoRoot)) {\n        final File cacheFolder = new File(this.storeFolder);\n\n        if (!cacheFolder.isDirectory()) {\n          if (cacheFolder.isFile()) {\n            throw new IOException(\"Can't create folder '\" + cacheFolder +\n                \"' because there is presented a file with such name!\");\n          }\n          logOptionally(\"Making SDK cache folder : \" + cacheFolder);\n          FileUtils.forceMkdir(cacheFolder);\n        }\n\n        final String definedOsxVersion = this.getOSXVersion();\n        final String sdkVersion = this.getGoVersion();\n\n        this.getLog().debug(\n            String.format(\"SdkVersion = %s, osxVersion = %s\", sdkVersion, definedOsxVersion));\n\n        if (isSafeEmpty(sdkVersion)) {\n          throw new MojoFailureException(\"GoLang SDK version is not defined!\");\n        }\n\n        final String sdkBaseName = String\n            .format(NAME_PATTERN, sdkVersion, this.getOs(), this.getArch(),\n                isSafeEmpty(definedOsxVersion) ? \"\" : \"-\" + definedOsxVersion);\n        warnIfContainsUC(\"Prefer usage of lower case chars only for SDK base name\", sdkBaseName);\n        result =\n            loadSDKAndUnpackIntoCache(proxySettings, cacheFolder, sdkBaseName, isDisableSdkLoad());\n      } else {\n        logOptionally(\"Detected predefined SDK root folder : \" + predefinedGoRoot);\n        result = new File(predefinedGoRoot);\n        if (!result.isDirectory()) {\n          throw new MojoFailureException(\"Predefined SDK root is not a directory : \" + result);\n        }\n      }\n    } finally {\n      LOCKER.unlock();\n    }\n    return result;\n  }\n\n  private void printBanner() {\n    for (final String s : BANNER) {\n      getLog().info(s);\n    }\n  }\n\n  public boolean isHideBanner() {\n    return this.hideBanner;\n  }\n\n  protected boolean doesNeedOneMoreAttempt(@Nonnull final ProcessResult result,\n                                           @Nonnull final String consoleOut,\n                                           @Nonnull final String consoleErr)\n      throws IOException, MojoExecutionException {\n    return false;\n  }\n\n  protected void doLogging(\n      final int resultCode,\n      final boolean error,\n      @Nonnull final String outLog,\n      @Nonnull final String errLog\n  ) throws MojoExecutionException {\n    if (getLog().isDebugEnabled()) {\n      getLog().debug(\"OUT_LOG: \" + outLog);\n      getLog().debug(\"ERR_LOG: \" + errLog);\n    }\n\n    this.processLogFiles(outLog, errLog);\n\n    this.printLogs(\n        error || isEnforcePrintOutput() || (this.isVerbose() && this.isCommandSupportVerbose()),\n        error, outLog, errLog);\n  }\n\n  protected boolean doMainBusiness(@Nullable final ProxySettings proxySettings,\n                                   final int maxAttempts)\n      throws InterruptedException, MojoFailureException, MojoExecutionException, IOException {\n    int iterations = 0;\n\n    boolean error = false;\n\n    while (!Thread.currentThread().isInterrupted()) {\n      final ProcessExecutor executor = prepareExecutor(proxySettings);\n      if (executor == null) {\n        logOptionally(\"The Mojo should not be executed\");\n        break;\n      }\n      final ProcessResult result = executor.executeNoTimeout();\n      final int resultCode = result.getExitValue();\n      error = resultCode != 0 && !isIgnoreErrorExitCode();\n      iterations++;\n\n      final String outLog = extractOutAsString();\n      final String errLog = extractErrorOutAsString();\n\n      this.doLogging(resultCode, error, outLog, errLog);\n\n      if (doesNeedOneMoreAttempt(result, outLog, errLog)) {\n        if (iterations > maxAttempts) {\n          throw new MojoExecutionException(\n              \"Too many iterations detected, may be some loop and bug at mojo \" +\n                  this.getClass().getName());\n        }\n        getLog().warn(\"Make one more attempt...\");\n      } else {\n        if (!isIgnoreErrorExitCode()) {\n          assertProcessResult(result);\n        }\n        break;\n      }\n    }\n\n    return error;\n  }\n\n  @Override\n  public final void execute() throws MojoExecutionException, MojoFailureException {\n    if (this.isSkip()) {\n      getLog().info(\"Skipping mvn-golang execution\");\n    } else {\n      if (this.doesNeedSessionLock()) {\n        lockMvnGolangSession();\n        if (Thread.currentThread().isInterrupted()) {\n          throw new MojoFailureException(\"Current thread is interrupted\");\n        }\n      }\n      try {\n        if (!isHideBanner()) {\n          printBanner();\n        }\n        doInit();\n\n        printEcho();\n\n        final ProxySettings proxySettings = extractProxySettings();\n        beforeExecution(proxySettings);\n\n        Exception exception = null;\n        boolean errorDuringMainBusiness = false;\n        try {\n          errorDuringMainBusiness = doMainBusiness(proxySettings, 10);\n        } catch (final IOException | InterruptedException | MojoExecutionException |\n                       MojoFailureException ex) {\n          if (ex instanceof InterruptedException) {\n            Thread.currentThread().interrupt();\n          }\n          exception = ex;\n        } finally {\n          afterExecution(null, errorDuringMainBusiness || exception != null);\n        }\n\n        if (exception != null) {\n          throw new MojoExecutionException(exception.getMessage(), exception);\n        } else if (errorDuringMainBusiness) {\n          throw new MojoFailureException(\"Mojo execution failed, see log\");\n        }\n      } finally {\n        if (this.doesNeedSessionLock()) {\n          unlockMvnGolangSession();\n        }\n      }\n    }\n  }\n\n  public void doInit() throws MojoFailureException, MojoExecutionException {\n\n  }\n\n  public void beforeExecution(@Nullable final ProxySettings proxySettings)\n      throws MojoFailureException, MojoExecutionException {\n\n  }\n\n  public void afterExecution(@Nullable final ProxySettings proxySettings, final boolean error)\n      throws MojoFailureException, MojoExecutionException {\n\n  }\n\n  public boolean isEnforcePrintOutput() {\n    return false;\n  }\n\n  @Nonnull\n  private String extractOutAsString() {\n    return new String(this.consoleOutBuffer.toByteArray(), Charset.defaultCharset());\n  }\n\n  @Nonnull\n  private String extractErrorOutAsString() {\n    return new String(this.consoleErrBuffer.toByteArray(), Charset.defaultCharset());\n  }\n\n  protected void printLogs(final boolean forcePrint, final boolean errorDetected,\n                           @Nonnull final String outLog, @Nonnull final String errLog) {\n    final boolean outLogNotEmpty = !outLog.isEmpty();\n    final boolean errLogNotEmpty = !errLog.isEmpty();\n\n    if (outLogNotEmpty) {\n      if (forcePrint || getLog().isDebugEnabled()) {\n        getLog().info(\"\");\n        getLog().info(\"---------Exec.Out---------\");\n        for (final String str : outLog.split(\"\\n\")) {\n          getLog().info(StrUtils.trimRight(str));\n        }\n        getLog().info(\"\");\n      } else {\n        getLog().debug(\"There is not any log out from the process\");\n      }\n    }\n\n    if (errLogNotEmpty) {\n      if (forcePrint) {\n        if (errorDetected) {\n          getLog().error(\"\");\n          getLog().error(\"---------Exec.Err---------\");\n          for (final String str : errLog.split(\"\\n\")) {\n            getLog().error(StrUtils.trimRight(str));\n          }\n          getLog().error(\"\");\n        } else {\n          getLog().warn(\"\");\n          getLog().warn(\"---------Exec.Err---------\");\n          for (final String str : errLog.split(\"\\n\")) {\n            getLog().warn(StrUtils.trimRight(str));\n          }\n          getLog().warn(\"\");\n        }\n      } else {\n        getLog().debug(\"---------Exec.Err---------\");\n        for (final String str : errLog.split(\"\\n\")) {\n          getLog().debug(StrUtils.trimRight(str));\n        }\n      }\n    } else {\n      getLog().debug(\"Error log buffer is empty\");\n    }\n\n  }\n\n  private void assertProcessResult(@Nonnull final ProcessResult result)\n      throws MojoFailureException {\n    final int code = result.getExitValue();\n    if (code != 0) {\n      throw new MojoFailureException(\"Process exit code : \" + code);\n    }\n  }\n\n  public boolean isSourceFolderRequired() {\n    return false;\n  }\n\n  public boolean isMojoMustNotBeExecuted() throws MojoFailureException {\n    try {\n      return isSourceFolderRequired() && !this.getSources(false).isDirectory();\n    } catch (IOException ex) {\n      throw new MojoFailureException(\"Can't check source folder\", ex);\n    }\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  public abstract String[] getTailArguments();\n\n  @Nonnull\n  @MustNotContainNull\n  public String[] getOptionalExtraTailArguments() {\n    return ArrayUtils.EMPTY_STRING_ARRAY;\n  }\n\n  @Nonnull\n  public String makeExecutableFileSubpath() {\n    return getExecSubpath() + File.separatorChar + getExec();\n  }\n\n  @Nonnull\n  public abstract String getGoCommand();\n\n  @Nonnull\n  @MustNotContainNull\n  public abstract String[] getCommandFlags();\n\n  @Nullable\n  private String getEnvPath() {\n    String path = System.getenv(\"PATH\");\n    if (path == null) {\n      this.getLog().warn(\"Can't find any defined PATH in environment\");\n    } else {\n      this.getLog().debug(\"Found env.PATH: \" + path);\n    }\n\n    final boolean filter = this.isFilterEnvPath();\n\n    if (path != null) {\n      final StringBuilder buffer = new StringBuilder();\n      for (final String s : path.split(Pattern.quote(File.pathSeparator))) {\n        if (filter && GOBINFOLDER_PATTERN.matcher(s).find()) {\n          getLog().debug(\"Removing item '\" + s + \"' from PATH because it looks like go/bin\");\n          continue;\n        }\n        if (buffer.length() > 0) {\n          buffer.append(File.pathSeparator);\n        }\n        buffer.append(s);\n        getLog().debug(\"Add item '\" + s + \"' to PATH\");\n      }\n      path = buffer.toString();\n    }\n\n    this.getLog().debug(\"Prepared PATH var content:\" + path);\n\n    return path;\n  }\n\n  private void addEnvVar(@Nonnull final ProcessExecutor executor, @Nonnull final String name,\n                         @Nonnull final String value) {\n    logOptionally(\" $\" + name + \" = \" + value);\n    executor.environment(name, value);\n  }\n\n  @Nonnull\n  private synchronized HttpClient getHttpClient(@Nullable final ProxySettings proxy)\n      throws MojoExecutionException {\n    if (this.httpClient == null) {\n      final HttpClientBuilder builder = HttpClients.custom();\n\n      if (proxy != null) {\n        if (proxy.hasCredentials()) {\n          final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();\n          credentialsProvider.setCredentials(new AuthScope(proxy.host, proxy.port),\n              new NTCredentials(GetUtils.ensureNonNull(proxy.username, \"\"), proxy.password,\n                  extractComputerName(), extractDomainName()));\n          builder.setDefaultCredentialsProvider(credentialsProvider);\n          getLog().debug(String\n              .format(\"Credentials provider has been created for proxy (username : %s): %s\",\n                  proxy.username, proxy));\n        }\n\n        final String[] ignoreForAddresses =\n            proxy.nonProxyHosts == null ? new String[0] : proxy.nonProxyHosts.split(\"\\\\|\");\n\n        final WildCardMatcher[] matchers;\n\n        if (ignoreForAddresses.length > 0) {\n          matchers = new WildCardMatcher[ignoreForAddresses.length];\n          for (int i = 0; i < ignoreForAddresses.length; i++) {\n            matchers[i] = new WildCardMatcher(ignoreForAddresses[i]);\n          }\n        } else {\n          matchers = new WildCardMatcher[0];\n        }\n\n        getLog().debug(\"Regular routing mode\");\n\n        final HttpRoutePlanner routePlanner =\n            new DefaultProxyRoutePlanner(new HttpHost(proxy.host, proxy.port, proxy.protocol)) {\n              @Override\n              @Nonnull\n              public HttpRoute determineRoute(@Nonnull final HttpHost host,\n                                              @Nonnull final HttpRequest request,\n                                              @Nonnull final HttpContext context)\n                  throws HttpException {\n                HttpRoute result = null;\n                final String hostName = host.getHostName();\n                for (final WildCardMatcher m : matchers) {\n                  if (m.match(hostName)) {\n                    getLog().debug(\"Ignoring proxy for host : \" + hostName);\n                    result = new HttpRoute(host);\n                    break;\n                  }\n                }\n                if (result == null) {\n                  result = super.determineRoute(host, request, context);\n                }\n                getLog().debug(\"Made connection route : \" + result);\n                return result;\n              }\n            };\n\n        builder.setRoutePlanner(routePlanner);\n        getLog().debug(\"Proxy will ignore: \" + Arrays.toString(matchers));\n      }\n\n      builder.setUserAgent(\"mvn-golang-wrapper-agent/1.0\");\n      builder.disableCookieManagement();\n\n      if (this.isDisableSslCheck()) {\n        this.getLog().warn(\"SSL certificate check is disabled\");\n        try {\n          final SSLContext sslcontext = SSLContext.getInstance(\"TLS\");\n          X509TrustManager tm = new X509TrustManager() {\n            @Override\n            public void checkClientTrusted(\n                @Nonnull @MustNotContainNull final X509Certificate[] arg0,\n                @Nonnull final String arg1) throws CertificateException {\n            }\n\n            @Override\n            public void checkServerTrusted(\n                @Nonnull @MustNotContainNull final X509Certificate[] arg0, @Nonnull String arg1)\n                throws CertificateException {\n            }\n\n            @Override\n            @Nullable\n            @MustNotContainNull\n            public X509Certificate[] getAcceptedIssuers() {\n              return null;\n            }\n          };\n          sslcontext.init(null, new TrustManager[] {tm}, null);\n\n          final SSLConnectionSocketFactory sslfactory =\n              new SSLConnectionSocketFactory(sslcontext, NoopHostnameVerifier.INSTANCE);\n          final Registry<ConnectionSocketFactory> r =\n              RegistryBuilder.<ConnectionSocketFactory>create()\n                  .register(\"https\", sslfactory)\n                  .register(\"http\", new PlainConnectionSocketFactory()).build();\n\n          builder.setConnectionManager(new BasicHttpClientConnectionManager(r));\n          builder.setSSLSocketFactory(sslfactory);\n          builder.setSSLContext(sslcontext);\n        } catch (final KeyManagementException | NoSuchAlgorithmException ex) {\n          throw new MojoExecutionException(\"Can't disable SSL certificate check\", ex);\n        }\n      } else {\n        this.getLog().debug(\"SSL check is enabled\");\n      }\n      this.httpClient = builder.build();\n    }\n    return this.httpClient;\n  }\n\n  protected void registerOutputBuffers(@Nonnull final ProcessExecutor executor) {\n    executor.redirectOutput(this.consoleOutBuffer);\n    executor.redirectError(this.consoleErrBuffer);\n  }\n\n  protected void registerEnvVars(\n      @Nonnull final ProcessExecutor result,\n      @Nonnull final File theGoRoot,\n      @Nullable final String theGoBin,\n      @Nullable final String theGoCache,\n      @Nonnull final File sourcesFile,\n      @MustNotContainNull @Nonnull final File[] goPathParts\n  ) throws IOException {\n    logOptionally(\"....Environment vars....\");\n\n    addEnvVar(result, \"GOROOT\", theGoRoot.getAbsolutePath());\n    this.project.getProperties().setProperty(\"mvn.golang.last.goroot\", theGoRoot.getAbsolutePath());\n\n    String preparedGoPath = IOUtils.makeOsFilePathWithoutDuplications(goPathParts);\n    if (isEnforceGoPathToEnd()) {\n      preparedGoPath = IOUtils.makeOsFilePathWithoutDuplications(makePathFromExtraGoPathElements(),\n          removeSrcFolderAtEndIfPresented(sourcesFile.getAbsolutePath()), getSpecialPartOfGoPath(),\n          preparedGoPath);\n    } else {\n      preparedGoPath = IOUtils\n          .makeOsFilePathWithoutDuplications(preparedGoPath, makePathFromExtraGoPathElements(),\n              removeSrcFolderAtEndIfPresented(sourcesFile.getAbsolutePath()),\n              getSpecialPartOfGoPath());\n    }\n    addEnvVar(result, \"GOPATH\", preparedGoPath);\n    this.project.getProperties().setProperty(\"mvn.golang.last.gopath\", preparedGoPath);\n\n    if (theGoBin == null) {\n      getLog().warn(\"GOBIN is disabled by direct order\");\n    } else {\n      addEnvVar(result, \"GOBIN\", theGoBin);\n      this.project.getProperties().setProperty(\"mvn.golang.last.gobin\", theGoBin);\n    }\n\n    if (theGoBin == null) {\n      getLog().warn(\"GOCACHE is not provided by direct order\");\n    } else {\n      addEnvVar(result, \"GOCACHE\", theGoCache);\n      this.project.getProperties().setProperty(\"mvn.golang.last.gocache\", theGoCache);\n    }\n\n    final String trgtOs = this.getTargetOS();\n    final String trgtArch = this.getTargetArch();\n    final String trgtArm = this.getTargetArm();\n    final String trgt386 = this.getTarget386();\n\n    if (trgt386 != null) {\n      addEnvVar(result, \"GO386\", trgt386);\n      this.project.getProperties().setProperty(\"mvn.golang.last.go386\", trgt386);\n    }\n\n    if (trgtOs != null) {\n      addEnvVar(result, \"GOOS\", trgtOs);\n      this.project.getProperties().setProperty(\"mvn.golang.last.goos\", trgtOs);\n    }\n\n    if (trgtArm != null) {\n      addEnvVar(result, \"GOARM\", trgtArm);\n      this.project.getProperties().setProperty(\"mvn.golang.last.goarm\", trgtArm);\n    }\n\n    if (trgtArch != null) {\n      addEnvVar(result, \"GOARCH\", trgtArch);\n      this.project.getProperties().setProperty(\"mvn.golang.last.goarch\", trgtArch);\n    }\n\n    final File gorootbootstrap = findGoRootBootstrap(true);\n    if (gorootbootstrap != null) {\n      addEnvVar(result, \"GOROOT_BOOTSTRAP\", gorootbootstrap.getAbsolutePath());\n      this.project.getProperties()\n          .setProperty(\"mvn.golang.last.goroot_bootstrap\", gorootbootstrap.getAbsolutePath());\n    }\n\n    String thePath = GetUtils.ensureNonNull(getEnvPath(), \"\");\n    thePath = IOUtils\n        .makeOsFilePathWithoutDuplications((theGoRoot + File.separator + getExecSubpath()), thePath,\n            theGoBin);\n    addEnvVar(result, \"PATH\", thePath);\n    this.project.getProperties().setProperty(\"mvn.golang.last.path\", thePath);\n\n    boolean go111moduleDetected = false;\n\n    for (final Map.Entry<?, ?> record : getEnv().entrySet()) {\n      if (ENV_GO111MODULE.equals(record.getKey().toString())) {\n        go111moduleDetected = true;\n      }\n      addEnvVar(result, record.getKey().toString(),\n          GetUtils.ensureNonNull(record.getValue(), \"\").toString());\n    }\n\n    if (this.isModuleMode()) {\n      if (go111moduleDetected) {\n        this.getLog().warn(String\n            .format(\"Module mode is true but %s detected among custom environment parameters\",\n                ENV_GO111MODULE));\n      } else {\n        this.getLog().warn(\n            String.format(\"Forcing '%s = on' because module mode is activated\", ENV_GO111MODULE));\n        addEnvVar(result, ENV_GO111MODULE, \"on\");\n      }\n    }\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  protected List<File> findAllGoModsInFolder(@Nonnull @MustNotContainNull final File folder)\n      throws IOException {\n    return new ArrayList<>(FileUtils\n        .listFiles(folder, FileFilterUtils.nameFileFilter(GO_MOD_FILE_NAME),\n            TrueFileFilter.INSTANCE));\n  }\n\n  @Nonnull\n  protected File getWorkingDirectoryForExecutor() throws IOException {\n    final String forcedWorkingDirdir = this.getWorkingDir();\n    if (forcedWorkingDirdir != null) {\n      final File result = new File(forcedWorkingDirdir);\n      if (!result.isDirectory()) {\n        throw new IOException(\"Working directory doesn't exist: \" + result);\n      }\n      return result;\n    }\n\n    if (this.isModuleMode()) {\n      final File srcFolder = this.getSources(false);\n      if (srcFolder.isDirectory()) {\n        final List<File> foundGoMods = this.findAllGoModsInFolder(srcFolder);\n        this.getLog().debug(String\n            .format(\"Detected %d go.mod files in source folder %s\", foundGoMods.size(), srcFolder));\n\n        foundGoMods.sort(Comparator.comparing(File::toString));\n\n        if (foundGoMods.isEmpty()) {\n          this.getLog().error(\n              \"Module mode is activated but there is no any go.mod file in the source folder: \" +\n                  srcFolder);\n          throw new IOException(\"Can't find any go.mod folder in the source folder: \" + srcFolder);\n        } else {\n          final File gomodFolder = foundGoMods.get(0).getParentFile();\n          this.getLog().info(String\n              .format(\"Detected module folder '%s' in use as working folder\", gomodFolder));\n          return gomodFolder;\n        }\n      } else {\n        this.getLog().debug(\"Source folder is not found: \" + srcFolder);\n      }\n    }\n\n    return this.getSources(isSourceFolderRequired());\n  }\n\n  /**\n   * Internal method which returns special part of GOPATH which can be formed by\n   * mojos. Must be either empty or contain folders divided by file path\n   * separator.\n   *\n   * @return special part of GOPATH, must not be null, by default must be empty\n   */\n  @Nonnull\n  protected String getSpecialPartOfGoPath() {\n    return \"\";\n  }\n\n  @Nonnull\n  protected String makePathFromExtraGoPathElements() {\n    String result = \"\";\n    if (this.addToGoPath != null) {\n      result = IOUtils.makeOsFilePathWithoutDuplications(this.addToGoPath);\n    }\n    return result;\n  }\n\n  public boolean isCommandSupportVerbose() {\n    return false;\n  }\n\n  @Nullable\n  protected String getSkipMojoPropertySuffix() {\n    return null;\n  }\n\n  @Nullable\n  protected ProcessExecutor prepareExecutor(@Nullable final ProxySettings proxySettings)\n      throws IOException, MojoFailureException, MojoExecutionException {\n    initConsoleBuffers();\n\n    final String execNameAdaptedForOs = adaptExecNameForOS(makeExecutableFileSubpath());\n    final File detectedRoot = findGoRoot(proxySettings);\n    final String gobin = getGoBin();\n    final String gocache = getGoCache();\n    final File[] gopathParts = findGoPath(true);\n\n    if (isMojoMustNotBeExecuted()) {\n      return null;\n    }\n\n    final String toolName =\n        FilenameUtils.normalize(GetUtils.ensureNonNull(getUseGoTool(), execNameAdaptedForOs));\n    final File executableFileInPathOrRoot = new File(getPathToFolder(detectedRoot) + toolName);\n\n    final File executableFileInBin =\n        gobin == null ? null : new File(getPathToFolder(gobin) + adaptExecNameForOS(getExec()));\n\n    final File[] exeVariants = new File[] {executableFileInBin, executableFileInPathOrRoot};\n\n    final File foundExecutableTool = findExisting(exeVariants);\n\n    if (foundExecutableTool == null) {\n      throw new MojoFailureException(\n          \"Can't find executable file : \" + Arrays.toString(exeVariants));\n    } else {\n      logOptionally(\"Executable file detected : \" + foundExecutableTool);\n    }\n\n    final List<String> commandLine = new ArrayList<>();\n    commandLine.add(foundExecutableTool.getAbsolutePath());\n\n    final String gocommand = getGoCommand();\n    if (!gocommand.isEmpty()) {\n      commandLine.add(getGoCommand());\n    }\n\n    boolean verboseAdded = false;\n\n    for (final String s : getCommandFlags()) {\n      if (s.equals(\"-v\")) {\n        verboseAdded = true;\n      }\n      commandLine.add(s);\n    }\n    if (this.isVerbose() && !verboseAdded && isCommandSupportVerbose()) {\n      commandLine.add(\"-v\");\n    }\n\n    commandLine.addAll(Arrays.asList(getBuildFlags()));\n    commandLine.addAll(Arrays.asList(getTailArguments()));\n    commandLine.addAll(Arrays.asList(getOptionalExtraTailArguments()));\n\n    final StringBuilder cli = new StringBuilder();\n    int index = 0;\n    for (final String s : commandLine) {\n      if (cli.length() > 0) {\n        cli.append(' ');\n      }\n      if (index == 0) {\n        cli.append(execNameAdaptedForOs);\n      } else {\n        cli.append(s);\n      }\n      index++;\n    }\n\n    getLog().info(String.format(\"Prepared command line : %s\", cli));\n\n    final ProcessExecutor result = new ProcessExecutor(commandLine);\n\n    final File workingDirectory = this.getWorkingDirectoryForExecutor();\n    if (workingDirectory.isDirectory()) {\n      logOptionally(\"Working directory: \" + workingDirectory);\n      result.directory(workingDirectory);\n    } else {\n      logOptionally(\"Working directory is not set because provided folder doesn't exist: \" +\n          workingDirectory);\n    }\n\n    logOptionally(\"\");\n\n    registerEnvVars(result, detectedRoot, gobin, gocache,\n        this.getSources(this.isSourceFolderRequired()), gopathParts);\n\n    logOptionally(\"........................\");\n\n    registerOutputBuffers(result);\n\n    return result;\n  }\n\n  private void processLogFiles(@Nonnull final String logOut, @Nonnull final String logErr)\n      throws MojoExecutionException {\n    final File reportsFolderFile = new File(this.getReportsFolder());\n\n    final String targetOutFileName = nullIfBlank(this.getOutLogFile());\n    final String targetErrFileName = nullIfBlank(this.getErrLogFile());\n\n    if (targetErrFileName != null ^ targetOutFileName != null) {\n      if (targetOutFileName == null && !logOut.isEmpty()) {\n        this.getLog()\n            .warn(\"File logging for ERR stream is ON but also detected text in output stream!\");\n      }\n      if (targetErrFileName == null && !logErr.isEmpty()) {\n        this.getLog()\n            .warn(\"File logging for OUT stream is ON but also detected text in error stream!\");\n      }\n    }\n\n    this.getLog().debug(\"log.file.out: \" + targetOutFileName);\n    this.getLog().debug(\"log.file.err: \" + targetErrFileName);\n\n    final File targetOutFile =\n        targetOutFileName == null ? null : new File(reportsFolderFile, targetOutFileName);\n    final File targetErrFile =\n        targetErrFileName == null ? null : new File(reportsFolderFile, targetErrFileName);\n\n\n    if (targetOutFile == null) {\n      this.getLog().debug(\"Log file to write output stream is not set\");\n    } else {\n      getLog().debug(\"Reports folder : \" + reportsFolderFile);\n      if (!reportsFolderFile.isDirectory() && !reportsFolderFile.mkdirs()) {\n        throw new MojoExecutionException(\n            \"Can't create folder for console logs : \" + reportsFolderFile);\n      }\n      try {\n        getLog().debug(\n            \"Writing \" + logOut.length() + \" chars as output console log : \" + targetOutFile);\n        FileUtils.write(targetOutFile, logOut, \"UTF-8\");\n      } catch (IOException ex) {\n        throw new MojoExecutionException(\n            \"Can't save console output log into file : \" + targetOutFile, ex);\n      }\n    }\n\n    if (targetErrFile == null) {\n      this.getLog().debug(\"Log file to write error stream is not set\");\n    } else {\n      getLog().debug(\"Reports folder : \" + reportsFolderFile);\n      if (!reportsFolderFile.isDirectory() && !reportsFolderFile.mkdirs()) {\n        throw new MojoExecutionException(\n            \"Can't create folder for console logs : \" + reportsFolderFile);\n      }\n      try {\n        getLog().debug(\n            \"Writing \" + logErr.length() + \" chars as error console log : \" + targetErrFile);\n        FileUtils.write(targetErrFile, logErr, \"UTF-8\");\n      } catch (IOException ex) {\n        throw new MojoExecutionException(\n            \"Can't save console error log into file : \" + targetErrFile, ex);\n      }\n    }\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/AbstractModuleAware.java",
    "content": "package com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.ArrayUtils;\nimport org.apache.maven.plugins.annotations.Parameter;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n\npublic abstract class AbstractModuleAware extends AbstractGoPackageAndDependencyAwareMojo {\n\n  /**\n   * Parameter allows define '-mod' parameter for command in format '-mod=value'.\n   * Also can be defined through property 'mvn.golang.module.mod'\n   * If the parameter is empty then it will not be added into command line and current default GoSDK value will be in use.\n   *\n   * @since 2.3.8\n   */\n  @Parameter(name = \"mod\")\n  protected String mod = null;\n\n  @Nullable\n  public String getMod() {\n    return findMvnProperty(\"mvn.golang.module.mod\", this.mod);\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  public final String[] getCommandFlags() {\n    final List<String> result = new ArrayList<>();\n    Collections.addAll(result, this.getAdditionalCommandFlags());\n\n    final String moduleMod = this.getMod();\n    if (moduleMod != null && moduleMod.trim().length() != 0) {\n      if (result.stream().anyMatch(x -> x.startsWith(\"-mod=\"))) {\n        this.getLog().warn(\"Detected direct 'mod' flag, configuration 'mod' option will be ignored\");\n      } else {\n        this.getLog().debug(\"Detected mod value: \" + moduleMod);\n        result.add(0, String.format(\"-mod=%s\", moduleMod.trim()));\n      }\n    }\n    return result.toArray(new String[0]);\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  protected String[] getAdditionalCommandFlags() {\n    return ArrayUtils.EMPTY_STRING_ARRAY;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/CustomScript.java",
    "content": "/*\n * Copyright 2018 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\n/**\n * Auxiliary class describes a custom script to be called for CVS folder.\n *\n * @since 2.1.8\n */\npublic class CustomScript {\n  /**\n   * Path to the script.\n   */\n  public String path;\n  /**\n   * Options to be provided to the script.\n   */\n  public String[] options;\n  /**\n   * If true then to not recognize execution error as fail.\n   */\n  public boolean ignoreFail = false;\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangBuildMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.GetUtils;\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport org.apache.maven.plugin.MojoFailureException;\nimport org.apache.maven.plugins.annotations.*;\nimport org.apache.maven.project.MavenProjectHelper;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.File;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\nimport static com.igormaznitsa.meta.common.utils.Assertions.assertNotNull;\n\n/**\n * The Mojo wraps the 'build' command.\n */\n@Mojo(name = \"build\", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE)\npublic class GolangBuildMojo extends AbstractModuleAware {\n\n  @Component\n  private MavenProjectHelper projectHelper;\n\n  /**\n   * Flag to attach build result file as artifact to the maven session.\n   * Also can be set through property <i>mvn.golang.build.attach</i>\n   *\n   * @since 2.3.7\n   */\n  @Parameter(name = \"attach\", defaultValue = \"false\")\n  private boolean attach;\n\n  /**\n   * Classifier for result file attachment.\n   * Also can be set through property <i>mvn.golang.build.attach.classifier</i>\n   * @since 2.3.7\n   */\n  @Parameter(name = \"attachClassifier\")\n  private String attachClassifier;\n\n  /**\n   * Type for result file attachment.\n   * Also can be set through property <i>mvn.golang.build.attach.type</i>\n   * @since 2.3.7\n   */\n  @Parameter(name = \"attachType\", defaultValue = \"bin\")\n  private String attachType;\n\n  /**\n   * Target folder where to place the result file.\n   */\n  @Parameter(name = \"resultFolder\", defaultValue = \"${project.build.directory}\")\n  private String resultFolder;\n\n  /**\n   * Name of the result file.\n   * <b>By default it uses ${project.build.finalName}</b>\n   */\n  @Parameter(name = \"resultName\", defaultValue = \"${project.build.finalName}\")\n  private String resultName;\n\n  /**\n   * Build mode indicates which kind of object file is to be built.\n   *\n   * @since 2.1.3\n   */\n  @Parameter(name = \"buildMode\", defaultValue = \"default\")\n  private String buildMode;\n\n  /**\n   * Strip result file. Symbol table and DWARF will be removed from the result\n   * file.\n   *\n   * @since 2.1.3\n   */\n  @Parameter(name = \"strip\", defaultValue = \"false\")\n  private boolean strip;\n\n  /**\n   * List of linker flags.\n   * <pre>\n   * {@code\n   *      <ldFlags>\n   *        <ldFlag>-a</ldFlag>\n   *        <ldFlag>main.prodVersion=1.2.3</ldFlag>\n   *      </ldFlags>\n   * }\n   * </pre>\n   *\n   * @since 2.1.3\n   */\n  @Parameter(name = \"ldFlags\")\n  private String[] ldFlags;\n\n  public boolean isAttach() {\n    return Boolean.parseBoolean(findMvnProperty(\"mvn.golang.build.attach\", Boolean.toString(this.attach)));\n  }\n\n  @Nullable\n  public String getAttachClassifier() {\n    return findMvnProperty(\"mvn.golang.build.attach.classifier\", this.attachClassifier);\n  }\n\n  @Nonnull\n  public String getAttachType() {\n    final String found = findMvnProperty(\"mvn.golang.build.attach.type\", this.attachType);\n    return GetUtils.ensureNonNull(found, \"bin\");\n  }\n\n  @MustNotContainNull\n  @Nonnull\n  public List<String> getLdflagsAsList() {\n    return this.ldFlags == null ? new ArrayList<>() : new ArrayList<>(Arrays.asList(this.ldFlags));\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"build\";\n  }\n\n  public boolean isStrip() {\n    return this.strip;\n  }\n\n  public void setStrip(final boolean flag) {\n    this.strip = flag;\n  }\n\n  @Nonnull\n  public String getBuildMode() {\n    return this.buildMode;\n  }\n\n  public void setBuildMode(@Nullable final String buildMode) {\n    this.buildMode = GetUtils.ensureNonNull(buildMode, \"default\");\n  }\n\n  @Nonnull\n  private File getResultFile() {\n    return new File(getResultFolder(), this.getResultName());\n  }\n\n  @Nonnull\n  public String getResultFolder() {\n    return assertNotNull(this.resultFolder);\n  }\n\n  public void setResultFolder(@Nonnull final String folder) {\n    this.resultFolder = assertNotNull(folder);\n  }\n\n  @Nonnull\n  public String getResultName() {\n    return assertNotNull(this.resultName);\n  }\n\n  public void setResultName(@Nonnull final String resultName) {\n    this.resultName = assertNotNull(resultName);\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"build\";\n  }\n\n  @Override\n  public void beforeExecution(@Nullable final ProxySettings proxySettings)\n      throws MojoFailureException {\n    final File folder = new File(getResultFolder());\n\n    if (!folder.isDirectory() && !folder.mkdirs()) {\n      throw new MojoFailureException(\"Can't create folder : \" + folder);\n    }\n\n    if (isVerbose() || !\"default\".equals(this.buildMode)) {\n      getLog().info(\"Build mode : \" + this.buildMode);\n    }\n\n    final String[] currentPackages = this.getPackages();\n\n    if (currentPackages != null && currentPackages.length > 1) {\n      getLog().warn(String.format(\n          \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%n\"\n              + \"!Result file output is ignored because non-single package!%n\"\n              + \"!            see: 'go help build' for more info          !%n\"\n              + \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\")\n      );\n    }\n  }\n\n  @Override\n  public void afterExecution(@Nullable final ProxySettings proxySettings, final boolean error)\n      throws MojoFailureException {\n    if (!error) {\n      final File resultFile = getResultFile();\n      // check that it exists\n      if (!resultFile.isFile()) {\n        throw new MojoFailureException(\"Can't find generated target file : \" + resultFile);\n      }\n      // softly try to make it executable\n      try {\n        if (!resultFile.setExecutable(true)) {\n          getLog().warn(\"Can't make result file executable : \" + resultFile);\n        }\n      } catch (SecurityException ex) {\n        getLog().warn(\"Security exception during executable flag set : \" + resultFile);\n      }\n\n      getLog().info(\"The Result file has been successfully created : \" + resultFile);\n\n      this.processAttach(resultFile);\n    }\n  }\n\n  @Override\n  public boolean isCommandSupportVerbose() {\n    return true;\n  }\n\n  private void processAttach(@Nonnull final File resultFile) {\n    if (this.isAttach()) {\n      final String classifier = this.getAttachClassifier();\n      final String type = this.getAttachType();\n      this.getLog().info(\"Activated attach as artifact (classifier=\" + classifier + \", type=\" + type + \"): \" + resultFile);\n      this.projectHelper.attachArtifact(this.getProject(), type, classifier, resultFile);\n    } else {\n      this.getLog().debug(\"Attach as artifact is turned off\");\n    }\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  protected String[] getAdditionalCommandFlags() {\n    final List<String> flags = new ArrayList<>();\n\n    flags.add(\"-buildmode=\" + this.getBuildMode());\n\n    final List<String> linkerFlags = this.getLdflagsAsList();\n\n    if (this.strip) {\n      if (!linkerFlags.contains(\"-s\")) {\n        linkerFlags.add(\"-s\");\n      }\n      if (!linkerFlags.contains(\"-w\")) {\n        linkerFlags.add(\"-w\");\n      }\n    }\n\n    if (!linkerFlags.isEmpty()) {\n      flags.add(\"-ldflags\");\n      final StringBuilder buffer = new StringBuilder();\n      for (final String s : linkerFlags) {\n        if (buffer.length() > 0) {\n          buffer.append(' ');\n        }\n        buffer.append(s);\n      }\n      flags.add(buffer.toString());\n    }\n\n    final String[] selectedPackages = this.getPackages();\n    final String selectedResultName = this.getResultName();\n\n    if (selectedPackages == null || selectedPackages.length < 2) {\n      if (\"none\".equals(selectedResultName.trim())) {\n        this.getLog().info(\"Result name is not defined so that '-o' option is not added.\");\n      } else {\n        flags.add(\"-o\");\n        flags.add(this.getResultFile().getAbsolutePath());\n      }\n    }\n\n    return flags.toArray(new String[0]);\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangCleanMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugin.MojoFailureException;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.codehaus.plexus.util.FileUtils;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.File;\nimport java.io.IOException;\n\n/**\n * The Mojo wraps the 'clean' command.\n */\n@Mojo(name = \"clean\", defaultPhase = LifecyclePhase.CLEAN, threadSafe = true)\npublic class GolangCleanMojo extends AbstractGoPackageAndDependencyAwareMojo {\n\n  /**\n   * Clean all folders provided by Go Path. <b>Be careful with the flag!</b>\n   *\n   * @since 2.1.1\n   */\n  @Parameter(name = \"cleanGoPath\", defaultValue = \"false\")\n  private boolean cleanGoPath;\n\n  /**\n   * Delete plugin Golang store folder It is folder where the plugin keeps\n   * cached SDKs and packages.\n   *\n   * @since 2.1.1\n   */\n  @Parameter(name = \"deleteStoreFolder\", defaultValue = \"false\")\n  private boolean deleteStoreFolder;\n\n  @Override\n  public boolean isSourceFolderRequired() {\n    return true;\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"clean\";\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"clean\";\n  }\n\n  @Override\n  public void beforeExecution(@Nullable final ProxySettings proxySettings)\n      throws MojoFailureException, MojoExecutionException {\n    super.beforeExecution(proxySettings);\n    if (this.isModuleMode() && this.getBuildFlags().length == 0) {\n      this.addTmpBuildFlagIfNotPresented(\"-modcache\");\n    }\n  }\n\n  private void deleteStoreFolder() throws MojoFailureException {\n    try {\n      final File goStoreFolder = new File(getStoreFolder());\n      if (goStoreFolder.isDirectory()) {\n        getLog().info(\"Deleting the Store Folder : \" + goStoreFolder);\n        FileUtils.deleteDirectory(goStoreFolder);\n      } else {\n        getLog().info(\"The Store Folder does not found : \" + goStoreFolder);\n      }\n    } catch (IOException ex) {\n      throw new MojoFailureException(\"Can't delete the Store Folder\", ex);\n    }\n  }\n\n  private void cleanGoPath() throws MojoFailureException {\n    try {\n      final File[] goPathFolders = findGoPath(false);\n      for (final File f : goPathFolders) {\n        if (f.isDirectory()) {\n          getLog().warn(\"Cleaning the Go Path folder : \" + f);\n          FileUtils.cleanDirectory(f);\n        } else {\n          getLog().info(\"Can't find GOPATH folder : \" + f);\n        }\n      }\n    } catch (IOException ex) {\n      throw new MojoFailureException(\"Can't clean the Go Path folder\", ex);\n    }\n  }\n\n  @Override\n  public void afterExecution(@Nullable final ProxySettings proxySettings, final boolean error)\n      throws MojoFailureException, MojoExecutionException {\n    super.afterExecution(proxySettings, false);\n\n    if (!error) {\n      final File directory;\n      if (getProject().getPackaging().equals(GOARTIFACT_PACKAGING)) {\n        directory = new File(getProject().getBasedir(), \"bin\");\n      } else {\n        directory = new File(getProject().getBuild().getDirectory());\n      }\n\n      if (directory.isDirectory()) {\n        try {\n          getLog().info(\"Deleting folder : \" + directory);\n          FileUtils.deleteDirectory(directory);\n        } catch (IOException ex) {\n          throw new MojoFailureException(\"Can't delete folder\", ex);\n        }\n      } else {\n        getLog().info(String.format(\"Folder %s is not found\", directory.getAbsolutePath()));\n      }\n\n      final File reportFolderFile = new File(getReportsFolder());\n      if (reportFolderFile.isDirectory()) {\n        try {\n          getLog().info(\"Deleting report folder : \" + reportFolderFile);\n          FileUtils.deleteDirectory(reportFolderFile);\n        } catch (IOException ex) {\n          throw new MojoExecutionException(\"Can't delete report folder : \" + reportFolderFile);\n        }\n      } else {\n        getLog().debug(\"There is no report folder : \" + reportFolderFile);\n      }\n\n      if (this.cleanGoPath) {\n        cleanGoPath();\n      }\n\n      if (this.deleteStoreFolder) {\n        deleteStoreFolder();\n      }\n    }\n  }\n\n  @Override\n  public boolean isIgnoreNonResolvableArtifact() {\n    return true;\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangCustomMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.common.utils.GetUtils;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\n/**\n * The Mojo allows to process commands which are not covered by MOJOs of the\n * plug-in.\n */\n@Mojo(name = \"custom\", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true, requiresDependencyResolution = ResolutionScope.NONE)\npublic class GolangCustomMojo extends AbstractGoPackageAndDependencyAwareMojo {\n\n  /**\n   * Command for Go tool to be executed\n   */\n  @Parameter(name = \"customCommand\", required = true)\n  private String customCommand;\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"clean\";\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return GetUtils.ensureNonNull(this.customCommand, \"\");\n  }\n\n  @Override\n  public boolean isEnforcePrintOutput() {\n    return true;\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangFixMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.File;\n\n/**\n * The Mojo wraps the 'fix' command.\n */\n@Mojo(name = \"fix\", defaultPhase = LifecyclePhase.VALIDATE, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE)\npublic class GolangFixMojo extends AbstractModuleAware {\n\n  @Override\n  public boolean isSourceFolderRequired() {\n    return true;\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"fix\";\n  }\n\n  @Override\n  @Nullable\n  @MustNotContainNull\n  protected String[] getDefaultPackages() {\n    return new String[] {'.' + File.separator + \"...\"};\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"fix\";\n  }\n\n  @Override\n  public boolean isEnforcePrintOutput() {\n    return true;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangFmtMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport java.io.File;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\n/**\n * The Mojo wraps the 'fmt' command.\n */\n@Mojo(name = \"fmt\", defaultPhase = LifecyclePhase.PROCESS_SOURCES, threadSafe = true, requiresDependencyResolution = ResolutionScope.NONE)\npublic class GolangFmtMojo extends AbstractGoPackageAndDependencyAwareMojo {\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"fmt\";\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"fmt\";\n  }\n\n  @Override\n  @Nullable\n  @MustNotContainNull\n  protected String[] getDefaultPackages() {\n    return new String[] {'.' + File.separator + \"...\"};\n  }\n\n  @Override\n  public boolean isSourceFolderRequired() {\n    return true;\n  }\n\n  @Override\n  public boolean isEnforcePrintOutput() {\n    return true;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangGenerateMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.File;\n\n/**\n * The Mojo wraps the 'generate' command.\n */\n@Mojo(name = \"generate\", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE)\npublic class GolangGenerateMojo extends AbstractModuleAware {\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"generate\";\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"generate\";\n  }\n\n  @Override\n  @Nullable\n  @MustNotContainNull\n  protected String[] getDefaultPackages() {\n    return new String[] {'.' + File.separator + \"...\"};\n  }\n\n  @Override\n  public boolean isSourceFolderRequired() {\n    return true;\n  }\n\n  @Override\n  public boolean isEnforcePrintOutput() {\n    return true;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangGetMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.Assertions;\nimport com.igormaznitsa.meta.common.utils.GetUtils;\nimport com.igormaznitsa.mvngolang.cvs.CVSType;\nimport com.igormaznitsa.mvngolang.utils.MavenUtils;\nimport com.igormaznitsa.mvngolang.utils.PackageList;\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport org.apache.commons.io.FileUtils;\nimport org.apache.commons.lang3.StringUtils;\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugin.MojoFailureException;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\nimport org.codehaus.plexus.interpolation.*;\nimport org.zeroturnaround.exec.InvalidExitValueException;\nimport org.zeroturnaround.exec.ProcessExecutor;\nimport org.zeroturnaround.exec.ProcessResult;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.File;\nimport java.io.IOException;\nimport java.net.URI;\nimport java.text.ParseException;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\n/**\n * The Mojo wraps the 'get' command.\n */\n@Mojo(name = \"get\", defaultPhase = LifecyclePhase.INITIALIZE, threadSafe = true, requiresDependencyResolution = ResolutionScope.NONE)\npublic class GolangGetMojo extends AbstractModuleAware {\n\n  private static final Pattern PATTERN_NO_SUBMODULE_MAPPING_FOUND_IN_GIT = Pattern.compile(\n          \"no\\\\s+submodule\\\\s+mapping\\\\s+found\\\\s+in\\\\s+.gitmodules for path\\\\s+\\\\'([\\\\S]+?)\\\\'\",\n          Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);\n  private static final Pattern PATTERN_EXTRACT_PACKAGE_AND_STATUS = Pattern\n          .compile(\"^package ([\\\\S]+?)\\\\s*:\\\\s*exit\\\\s+status\\\\s+([\\\\d]+?)\\\\s*$\",\n                  Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);\n\n  /**\n   * Script to be called in the end of all operations over CVS, <b>it will be\n   * executed separately for each package</b>. The Script will be started with\n   * the package CVS root folder. During start there will be added number of\n   * environment variables: MVNGO_CVS_BRANCH, MVNGO_CVS_TAG, MVNGO_CVS_REVISION,\n   * MVNGO_CVS_PACKAGE\n   *\n   * @since 2.1.8\n   */\n  @Parameter(name = \"customScript\")\n  private CustomScript customScript;\n\n  /**\n   * Path to a file contains list of packages. Each package takes a line and\n   * described in format 'package: NAME [,branch: BRANCH][,tag: TAG][,revision:\n   * REVISION]'\n   * <p>\n   * There is special field value 'none' which allows to define value but to not\n   * make any work, sometime it is useful for multi-profile projects.\n   * <p>\n   * NB! Its value can be provided through property\n   * 'mvn.golang.get.packages.file', but keep in mind that the value will be the\n   * same for all get goals.\n   *\n   * @since 2.1.9\n   */\n  @Parameter(name = \"externalPackageFile\")\n  private String externalPackageFile;\n\n  /**\n   * Flag to try to fix GIT cache error if it is detected.\n   *\n   * @since 1.0\n   */\n  @Parameter(name = \"autofixGitCache\", defaultValue = \"false\")\n  private boolean autofixGitCache;\n\n  /**\n   * Branch to be activated.\n   *\n   * @since 2.1.0\n   */\n  @Parameter(name = \"branch\")\n  private String branch;\n\n  /**\n   * Tag to be activated.\n   *\n   * @since 2.1.0\n   */\n  @Parameter(name = \"tag\")\n  private String tag;\n\n  /**\n   * Revision to be activated.\n   *\n   * @since 2.1.1\n   */\n  @Parameter(name = \"revision\")\n  private String revision;\n\n  /**\n   * Allows to define custom options for CVS operation.\n   *\n   * @since 2.1.5\n   */\n  @Parameter(name = \"customCvsOptions\")\n  private String[] customCvsOptions;\n\n  /**\n   * Custom executable CVS file to be executed for branch, tag and revision\n   * operations.\n   *\n   * @since 2.1.1\n   */\n  @Parameter(name = \"cvsExe\")\n  private String cvsExe;\n\n  /**\n   * Search sources for package and its compiled version, enforce delete of\n   * found source folder and compiled '.a' file.\n   *\n   * @since 2.1.4\n   */\n  @Parameter(name = \"enforceDeletePackageFiles\", defaultValue = \"false\")\n  private boolean enforceDeletePackageFiles;\n\n  /**\n   * Delete whole common pkg folder at $GOPATH/pkg.\n   *\n   * @since 2.1.6\n   */\n  @Parameter(name = \"deleteCommonPkg\", defaultValue = \"false\")\n  private boolean deleteCommonPkg;\n\n  /**\n   * Allows directly define relative path to the package containing CVS data\n   * inside 'src' folder for package, by default the folder is the same as\n   * package.\n   *\n   * @since 2.1.5\n   */\n  @Parameter(name = \"relativePathToCvsFolder\")\n  private String relativePathToCvsFolder;\n\n  /**\n   * Disable auto-search for CVS folder in package folder hierarchy, it works\n   * only if CVS folder is not defined directly.\n   *\n   * @since 2.1.5\n   */\n  @Parameter(name = \"disableCvsAutosearch\", defaultValue = \"false\")\n  private boolean disableCvsAutosearch;\n\n  /**\n   * Allow lock maven session during command processing. It increases stability of work in parallel mode.\n   *\n   * @since 2.3.3\n   */\n  @Parameter(name = \"allowLockSession\", defaultValue = \"true\")\n  private boolean allowLockSession;\n\n  private List<PackageList.Package> integralPackageList;\n\n  @Nonnull\n  private static String processSlashes(@Nonnull final String str) {\n    final StringBuilder result = new StringBuilder();\n    boolean check = true;\n    for (final char c : str.toCharArray()) {\n      if (check) {\n        if (c == '\\\\' || c == '/') {\n          continue;\n        } else {\n          check = false;\n        }\n      }\n      if (c == '\\\\' || c == '/') {\n        result.append(File.separatorChar);\n      } else {\n        result.append(c);\n      }\n    }\n\n    while (result.length() > 0) {\n      final char last = result.charAt(result.length() - 1);\n      if (last == '/' || last == '\\\\') {\n        result.deleteCharAt(result.length() - 1);\n      } else {\n        break;\n      }\n    }\n\n    return result.toString();\n  }\n\n  public boolean isAllowLockSession() {\n    return this.allowLockSession;\n  }\n\n  public void setAllowLockSession(final boolean flag) {\n    this.allowLockSession = flag;\n  }\n\n  @Nullable\n  public String getExternalPackageFile() {\n    return findMvnProperty(\"mvn.golang.get.packages.file\", this.externalPackageFile);\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  public String[] getPackages() {\n    final String[] result = new String[this.integralPackageList.size()];\n    for (int i = 0; i < this.integralPackageList.size(); i++) {\n      result[i] = this.integralPackageList.get(i).getPackage();\n    }\n    return result;\n  }\n\n  @Nullable\n  public CustomScript getCustomScript() {\n    return this.customScript;\n  }\n\n  private synchronized boolean processCVS(\n      @Nonnull @MustNotContainNull final List<PackageList.Package> packages,\n      @Nullable final ProxySettings proxySettings,\n      @Nonnull @MustNotContainNull final File[] goPath) {\n    if (!packages.isEmpty()) {\n      for (final File f : goPath) {\n        for (final PackageList.Package p : packages) {\n          File rootCvsFolder = this.makePathToPackageSources(f, p.getPackage());\n\n          if (this.getRelativePathToCvsFolder() == null) {\n            rootCvsFolder = this.isDisableCvsAutoSearch() ? rootCvsFolder :\n                this.findRootCvsFolderForPackageSources(f, rootCvsFolder);\n          }\n\n          if (rootCvsFolder == null) {\n            getLog().error(\n                \"Can't find CVS folder, may be it was not initially loaded from repository: \" + p);\n            return false;\n          }\n\n          if (this.getLog().isDebugEnabled()) {\n            this.getLog().debug(String.format(\"CVS folder path for %s is %s\", p, rootCvsFolder));\n          }\n\n          if (!rootCvsFolder.isDirectory()) {\n            this.getLog().error(String.format(\"Can't find CVS folder for package '%s' at '%s'\", p,\n                rootCvsFolder.getAbsolutePath()));\n            return false;\n          } else {\n            final CVSType repo = CVSType.investigateFolder(rootCvsFolder);\n\n            if (repo == CVSType.UNKNOWN) {\n              this.getLog().error(\n                  \"Can't recognize CVS in the folder : \" + rootCvsFolder + \" (for package '\" + p +\n                      \"')\");\n              this.getLog().error(\n                  \"May be to define folder directly through <relativePathToCvsFolder>...</relativePathToCvsFolder>!\");\n              return false;\n            }\n\n            final String[] customcvs = this.getCustomCvsOptions();\n\n            if (customcvs != null || p.doesNeedCvsProcessing()) {\n\n              if (!repo.getProcessor()\n                  .prepareFolder(this.getLog(), proxySettings, this.getCvsExe(), rootCvsFolder)) {\n                this.getLog().debug(\"Can't prepare folder : \" + rootCvsFolder);\n                return false;\n              }\n\n              if (customcvs != null && p.doesNeedCvsProcessing()) {\n                this.getLog().warn(\n                    \"CVS branch, tag or revision are ignored for provided custom CVS options!\");\n              }\n\n              if (customcvs != null) {\n                this.getLog().info(\"Custom CVS options : \" + Arrays.toString(customcvs));\n                if (!repo.getProcessor()\n                    .processCVSForCustomOptions(this.getLog(), proxySettings, rootCvsFolder,\n                        this.getCvsExe(), customcvs)) {\n                  return false;\n                }\n              } else if (p.doesNeedCvsProcessing()) {\n                this.getLog().info(String\n                    .format(\"Switch '%s' to branch = '%s', tag = '%s', revision = '%s'\", p,\n                        GetUtils.ensureNonNull(p.getBranch(), \"_\"),\n                        GetUtils.ensureNonNull(p.getTag(), \"_\"),\n                        GetUtils.ensureNonNull(p.getRevision(), \"_\")));\n                if (!repo.getProcessor()\n                    .processCVSRequisites(this.getLog(), proxySettings, this.getCvsExe(),\n                        rootCvsFolder, p.getBranch(), p.getTag(), p.getRevision())) {\n                  return false;\n                }\n              }\n            }\n          }\n\n          if (this.getCustomScript() != null) {\n            if (!processCustomScriptCallForPackage(p.getPackage(), rootCvsFolder,\n                Assertions.assertNotNull(this.getCustomScript()))) {\n              return false;\n            }\n          }\n\n        }\n      }\n    }\n    return true;\n  }\n\n  private boolean processCustomScriptCallForPackage(@Nonnull final String packageName,\n                                                    @Nonnull final File rootCvsFolder,\n                                                    @Nonnull final CustomScript script) {\n    final List<String> command = new ArrayList<>();\n\n    command.add(script.path);\n    if (script.options != null) {\n      command.addAll(Arrays.asList(script.options));\n    }\n\n    if (getLog().isDebugEnabled()) {\n      getLog().debug(\"CLI : \" + command);\n      getLog().debug(\"Package name : \" + packageName);\n      getLog().debug(\"Root CVS folder : \" + rootCvsFolder);\n    }\n\n    getLog().warn(String.format(\"Starting script in VCS folder [%s] : %s\", packageName,\n        StringUtils.join(command.toArray(), ' ')));\n\n    final ProcessExecutor processExecutor = new ProcessExecutor(command.toArray(new String[0]));\n    processExecutor\n        .exitValueAny()\n        .directory(rootCvsFolder)\n        .environment(\"MVNGO_CVS_BRANCH\", GetUtils.ensureNonNull(this.branch, \"\"))\n        .environment(\"MVNGO_CVS_TAG\", GetUtils.ensureNonNull(this.tag, \"\"))\n        .environment(\"MVNGO_CVS_REVISION\", GetUtils.ensureNonNull(this.revision, \"\"))\n        .environment(\"MVNGO_CVS_PACKAGE\", packageName)\n        .redirectError(System.err)\n        .redirectOutput(System.out);\n\n    boolean result = false;\n\n    try {\n      final ProcessResult process = processExecutor.executeNoTimeout();\n      final int exitValue = process.getExitValue();\n\n      result = script.ignoreFail || exitValue == 0;\n    } catch (IOException | InterruptedException | InvalidExitValueException ex) {\n      getLog().error(\"Error in custom script processing\", ex);\n    }\n\n    return result;\n  }\n\n  public boolean isDisableCvsAutoSearch() {\n    return this.disableCvsAutosearch;\n  }\n\n  public boolean getDeleteCommonPkg() {\n    return this.deleteCommonPkg;\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"get\";\n  }\n\n  @Override\n  public boolean isSkip() {\n    return super.isSkip()\n        || Boolean.parseBoolean(\n        MavenUtils.findProperty(this.getSession(), this.getProject(), \"mdep.skip\", \"false\"));\n  }\n\n  @Nullable\n  @MustNotContainNull\n  public String[] getCustomCvsOptions() {\n    return this.customCvsOptions;\n  }\n\n  @Nullable\n  public String getRelativePathToCvsFolder() {\n    return this.relativePathToCvsFolder;\n  }\n\n  public boolean isAutoFixGitCache() {\n    return this.autofixGitCache;\n  }\n\n  public boolean isEnforceDeletePackageFiles() {\n    return this.enforceDeletePackageFiles;\n  }\n\n  @Nullable\n  public String getRevision() {\n    return this.revision;\n  }\n\n  @Nullable\n  public String getBranch() {\n    return this.branch;\n  }\n\n  @Nullable\n  public String getTag() {\n    return this.tag;\n  }\n\n  @Nullable\n  public String getCvsExe() {\n    return this.cvsExe;\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"get\";\n  }\n\n  @Override\n  public boolean isEnforcePrintOutput() {\n    return true;\n  }\n\n  @Override\n  public boolean isMojoMustNotBeExecuted() throws MojoFailureException {\n    final String[] packages = getTailArguments();\n    final boolean result;\n    if (packages.length == 0) {\n      getLog().info(\"There are no packages directly provided as tail arguments\");\n      result = true;\n    } else {\n      result = super.isMojoMustNotBeExecuted();\n    }\n    return result;\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  private List<String> extractProblemPackagesFromErrorLog(@Nonnull final String errorLog) {\n    final List<String> result = new ArrayList<>();\n    final Matcher extractor = PATTERN_EXTRACT_PACKAGE_AND_STATUS.matcher(errorLog);\n    while (extractor.find()) {\n      final String packageName = extractor.group(1);\n      final String status = extractor.group(2);\n      if (!\"0\".equals(status)) {\n        result.add(packageName);\n      }\n    }\n    return result;\n  }\n\n  @Nullable\n  private File findRootCvsFolderForPackageSources(@Nonnull final File rootFolder,\n                                                  @Nullable final File packageSourceFolder) {\n    File foundFile = null;\n    if (packageSourceFolder != null) {\n      final File srcFolder = getSrcFolder(rootFolder);\n\n      File current = packageSourceFolder;\n\n      while (!srcFolder.equals(current)) {\n        if (CVSType.investigateFolder(current) != CVSType.UNKNOWN) {\n          foundFile = current;\n          break;\n        }\n        current = current.getParentFile();\n      }\n    }\n    return foundFile;\n  }\n\n  @Nonnull\n  private File getSrcFolder(@Nonnull final File goPath) {\n    return new File(goPath, \"src\");\n  }\n\n  @Nonnull\n  private File makePathToPackageSources(@Nonnull final File goPath, @Nonnull final String pack) {\n    String path = pack.trim();\n    final String predefinedCvsPath = getRelativePathToCvsFolder();\n\n    if (predefinedCvsPath != null) {\n      path = processSlashes(predefinedCvsPath);\n    } else {\n      try {\n        final URI uri = URI.create(path);\n        path = processSlashes(uri.getPath());\n      } catch (IllegalArgumentException ex) {\n        // it is not url\n        path = processSlashes(path);\n      }\n    }\n\n    return new File(getSrcFolder(goPath), path);\n  }\n\n  @Nonnull\n  private File makePathToPackageCompiled(@Nonnull final File goPath, @Nonnull final String pack) {\n    String path = pack.trim();\n\n    try {\n      final URI uri = URI.create(path);\n      path = processSlashes(uri.getPath());\n    } catch (IllegalArgumentException ex) {\n      // it is not url\n      path = processSlashes(path);\n    }\n\n    return new File(goPath,\n        \"pkg\" + File.separatorChar + this.getOs() + '_' + this.getArch() + File.separatorChar +\n            path);\n  }\n\n  private boolean tryToFixGitCacheErrorsForPackages(\n      @Nonnull @MustNotContainNull final List<String> packages) throws IOException {\n    final File[] goPath = findGoPath(true);\n\n    int fixed = 0;\n\n    for (final File f : goPath) {\n      for (final String s : packages) {\n        final File packageFolder = makePathToPackageSources(f, s);\n        if (packageFolder.isDirectory()) {\n          final CVSType repo = CVSType.investigateFolder(packageFolder);\n          if (repo == CVSType.GIT) {\n            getLog().warn(String\n                .format(\"Executing 'git rm -r --cached .' in %s\", packageFolder.getAbsolutePath()));\n            final int result = repo.getProcessor()\n                .execute(getCvsExe(), getLog(), packageFolder, \"rm\", \"-r\", \"--cached\", \".\");\n            if (result != 0) {\n              return false;\n            }\n            fixed++;\n          } else {\n            getLog().warn(\n                String.format(\"Folder %s is not GIT repository\", packageFolder.getAbsolutePath()));\n            return false;\n          }\n\n          fixed++;\n        } else {\n          getLog().debug(\"Folder \" + packageFolder + \" is not found\");\n        }\n      }\n    }\n    return fixed != 0;\n  }\n\n  private void preparePackageList() throws MojoExecutionException {\n    final boolean debugEnabled = getLog().isDebugEnabled();\n\n    if (debugEnabled) {\n      getLog().debug(\"Preparing package list\");\n    }\n\n    final String[] packagesInConfiguration = super.getPackages();\n    final List<PackageList.Package> list = new ArrayList<>();\n\n    final String extPackageFilePath = this.getExternalPackageFile();\n\n    if (extPackageFilePath != null) {\n      if (\"none\".equals(extPackageFilePath)) {\n        getLog().warn(\"Provided value 'none' as package list file name, so that it is ignored\");\n      } else {\n        final File extFile = new File(extPackageFilePath);\n\n        getLog().info(\"Loading external package list file : \" + extFile.getAbsolutePath());\n\n        try {\n          String text = FileUtils.readFileToString(extFile, \"UTF-8\");\n          if (getLog().isDebugEnabled()) {\n            getLog().debug(text);\n          }\n          text = interpolate(text);\n          list.addAll(new PackageList(extFile, text, new PackageList.ContentProvider() {\n            @Override\n            @Nonnull\n            public String readContent(@Nonnull final File contentFile) throws IOException {\n              if (!contentFile.isFile()) {\n                throw new IOException(\"Can't find file : \" + contentFile.getAbsolutePath());\n              }\n              try {\n                String text = FileUtils.readFileToString(contentFile, \"UTF-8\");\n                if (getLog().isDebugEnabled()) {\n                  getLog().debug(text);\n                }\n                return interpolate(text);\n              } catch (InterpolationException ex) {\n                throw new IOException(\"Can't interpolate text for error\", ex);\n              }\n            }\n          }).getPackages());\n        } catch (InterpolationException ex) {\n          throw new MojoExecutionException(\"Interpolation error with file : \" + extFile, ex);\n        } catch (IOException ex) {\n          throw new MojoExecutionException(\"Can't load external package list file : \" + extFile,\n              ex);\n        } catch (ParseException ex) {\n          throw new MojoExecutionException(\"Can't parse external package list file\", ex);\n        }\n      }\n    } else {\n      if (debugEnabled) {\n        getLog().debug(\"There is no provided external package list file\");\n      }\n    }\n\n    if (packagesInConfiguration != null && packagesInConfiguration.length > 0) {\n      for (final String p : packagesInConfiguration) {\n        list.add(new PackageList.Package(p, this.getBranch(), this.getTag(), this.getRevision()));\n      }\n    } else {\n      if (debugEnabled) {\n        getLog().debug(\"There are no defined packages in mojo configuration\");\n      }\n    }\n\n    this.integralPackageList = Collections.unmodifiableList(list);\n\n    if (debugEnabled) {\n      for (final PackageList.Package p : this.integralPackageList) {\n        getLog().debug(\"Added package in list: \" + p.makeString());\n      }\n    }\n  }\n\n  @Override\n  protected boolean doesNeedSessionLock() {\n    return this.getSession().isParallel() && this.isAllowLockSession();\n  }\n\n  @Override\n  public void beforeExecution(@Nullable final ProxySettings proxySettings)\n      throws MojoFailureException, MojoExecutionException {\n\n    preparePackageList();\n\n    if (getDeleteCommonPkg()) {\n      getLog().warn(\"Request to delete whole common pkg folder\");\n\n      final File[] goPath;\n      try {\n        goPath = findGoPath(true);\n      } catch (IOException ex) {\n        throw new MojoExecutionException(\"Can't get $GOPATH\", ex);\n      }\n\n      for (final File f : goPath) {\n        final File pkgBinary = new File(f, \"pkg\");\n\n        if (pkgBinary.isDirectory()) {\n          try {\n            FileUtils.deleteDirectory(pkgBinary);\n            getLog().warn(\"Folder \" + pkgBinary + \" has been deleted\");\n          } catch (IOException ex) {\n            throw new MojoExecutionException(\"Can't delete PKG folder : \" + pkgBinary, ex);\n          }\n        } else {\n          getLog().info(\"PKG folder is not found : \" + pkgBinary);\n        }\n      }\n    }\n\n    if (isEnforceDeletePackageFiles()) {\n      int deletedInstances = 0;\n      getLog().debug(\n          \"Detected request to delete both package source and binary folders if they are presented\");\n\n      final String[] packages = this.getPackages();\n      final File[] goPath;\n      try {\n        goPath = findGoPath(true);\n      } catch (IOException ex) {\n        throw new MojoExecutionException(\"Can't find $GOPATH\", ex);\n      }\n\n      if (packages != null) {\n        for (final File f : goPath) {\n          for (final String p : packages) {\n            getLog().info(\"Removing binary and source folders for package '\" + p + \"' in \" + f);\n\n            final File pkgSources = this.makePathToPackageSources(f, p);\n            final File pkgBinary = this.makePathToPackageCompiled(f, p);\n\n            getLog().debug(\"Src folder : \" + pkgSources);\n            getLog().debug(\"Pkg folder : \" + pkgBinary);\n\n            if (pkgSources.isDirectory()) {\n              try {\n                FileUtils.deleteDirectory(pkgSources);\n                deletedInstances++;\n              } catch (IOException ex) {\n                throw new MojoExecutionException(\"Can't delete source folder : \" + pkgSources, ex);\n              }\n              getLog().info(\"\\tDeleted source folder : \" + pkgSources);\n            } else {\n              getLog().debug(\"Folder \" + pkgSources + \" is not found\");\n            }\n\n            if (pkgBinary.isDirectory()) {\n              try {\n                FileUtils.deleteDirectory(pkgBinary);\n                deletedInstances++;\n              } catch (IOException ex) {\n                throw new MojoExecutionException(\"Can't delete binary folder : \" + pkgBinary, ex);\n              }\n              getLog().info(\"\\tDeleted binary folder : \" + pkgBinary);\n            } else {\n              final File compiled = new File(pkgBinary.getAbsolutePath() + \".a\");\n              if (compiled.isFile()) {\n                if (!compiled.delete()) {\n                  throw new MojoExecutionException(\"Can't delete compiled file : \" + compiled);\n                }\n                deletedInstances++;\n                getLog().info(\"\\tDeleted compiled file : \" + compiled);\n              } else {\n                getLog().debug(\"File \" + compiled + \" is not found\");\n              }\n            }\n          }\n        }\n      }\n\n      if (deletedInstances > 0) {\n        try {\n          getLog().info(\"making 1.5 second delay to provide time for host-OS to analyze file time stamp\");\n          Thread.sleep(1500L);\n        } catch (InterruptedException ex) {\n          throw new MojoExecutionException(\"Interrupted\");\n        }\n      }\n    }\n\n    final String[] customCvs = this.getCustomCvsOptions();\n\n    boolean hasTagBranchOrRevision = false;\n\n    final List<PackageList.Package> packages = Assertions\n        .assertNotNull(\"Integral package list must be not initialized\", this.integralPackageList);\n\n    for (final PackageList.Package p : packages) {\n      hasTagBranchOrRevision |= p.doesNeedCvsProcessing();\n      if (hasTagBranchOrRevision) {\n        break;\n      }\n    }\n\n    if (customCvs != null || hasTagBranchOrRevision) {\n      final File[] goPath;\n      try {\n        goPath = findGoPath(true);\n      } catch (IOException ex) {\n        throw new MojoFailureException(\"Can't find $GOPATH\", ex);\n      }\n\n      getLog().info(\"(!) Get initial version of package repository before CVS operations\");\n      this.buildFlagsToIgnore.add(\"-u\");\n      this.addTmpBuildFlagIfNotPresented(\"-d\");\n\n      try {\n        final boolean error = this.doMainBusiness(proxySettings, 10);\n        if (error) {\n          throw new Exception(\n              \"error as result of 'get' operation during initial loading of packages \" +\n                  Arrays.toString(this.getPackages()));\n        }\n      } catch (Exception ex) {\n        throw new MojoExecutionException(\"Can't get packages\", ex);\n      } finally {\n        this.buildFlagsToIgnore.clear();\n        this.tempBuildFlags.clear();\n      }\n\n      getLog().debug(String.format(\"Switching branch and tag for packages : branch = %s , tag = %s\",\n          GetUtils.ensureNonNull(this.branch, \"...\"), GetUtils.ensureNonNull(this.tag, \"...\")));\n      getLog().debug(\"Custom CVS options : \" + Arrays.toString(customCvsOptions));\n\n      if (!processCVS(packages, proxySettings, goPath)) {\n        throw new MojoFailureException(\n            \"Can't change branch or tag or execute custom CVS options, see the log for errors!\");\n      }\n    }\n  }\n\n  @Nonnull\n  private String interpolate(@Nonnull final String str) throws IOException, InterpolationException {\n    Interpolator interpolator = new StringSearchInterpolator();\n    interpolator.addValueSource(new MapBasedValueSource(this.getProject().getProperties()));\n    interpolator.addValueSource(new MapBasedValueSource(System.getProperties()));\n    interpolator.addValueSource(new EnvarBasedValueSource());\n    return interpolator.interpolate(str);\n  }\n\n  @Override\n  public boolean isCommandSupportVerbose() {\n    return true;\n  }\n\n  @Override\n  protected boolean doesNeedOneMoreAttempt(@Nonnull final ProcessResult processResult,\n                                           @Nonnull final String consoleOut,\n                                           @Nonnull final String consoleErr)\n      throws IOException, MojoExecutionException {\n    boolean result = false;\n    if (processResult.getExitValue() != 0) {\n      final Matcher matcher = PATTERN_NO_SUBMODULE_MAPPING_FOUND_IN_GIT.matcher(consoleErr);\n\n      if (matcher.find()) {\n        final List<String> packagesWithDetectedGitCacheErrors =\n            extractProblemPackagesFromErrorLog(consoleErr);\n        if (!packagesWithDetectedGitCacheErrors.isEmpty()) {\n          if (this.autofixGitCache) {\n\n            getLog().warn(\"Trying to fix the detected git cache errors automatically..\");\n\n            result = tryToFixGitCacheErrorsForPackages(packagesWithDetectedGitCacheErrors);\n          } else {\n\n            for (final String s : packagesWithDetectedGitCacheErrors) {\n              getLog().error(String.format(\n                  \"Detected Git cache error for package '%s', can be fixed with 'git rm -r --cached .'\",\n                  s));\n            }\n\n          }\n        }\n      }\n    }\n    return result;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangInstallMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.mvngolang.utils.MavenUtils;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\n\n\n/**\n * The Mojo wraps the 'install' command.\n */\n@Mojo(name = \"install\", defaultPhase = LifecyclePhase.DEPLOY, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE)\npublic class GolangInstallMojo extends AbstractModuleAware {\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"install\";\n  }\n\n  @Override\n  public boolean isSkip() {\n    return super.isSkip()\n        || Boolean.parseBoolean(MavenUtils\n        .findProperty(this.getSession(), this.getProject(), \"maven.deploy.skip\", \"false\"));\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"install\";\n  }\n\n  @Override\n  public boolean isSourceFolderRequired() {\n    return true;\n  }\n\n  @Override\n  public boolean isEnforcePrintOutput() {\n    return true;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangJfrogCliMojo.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport java.io.File;\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.List;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.commons.lang3.NotImplementedException;\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugin.MojoFailureException;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.zeroturnaround.exec.ProcessExecutor;\n\n/**\n * Minimalistic mojo provides way to call external JFrog CLI executable tool\n * with environment provided by the Golang wrapper and wrapped GoSDK.<b>JFrog\n * CLI tool must be provided externally!</b>\n * JFrog CLI executable file can be downloaded from\n * <a href=\"https://jfrog.com/getcli/\">the web page</a>\n * Documentation of the JFrog CLI can be found\n * <a href=\"https://www.jfrog.com/confluence/display/CLI/JFrog+CLI\">here</a>.\n *\n * @since 2.3.0\n */\n@Mojo(name = \"jfrog-cli\", defaultPhase = LifecyclePhase.NONE, threadSafe = true)\npublic class GolangJfrogCliMojo extends AbstractGoDependencyAwareMojo {\n\n  /**\n   * Path to a JFrog CLI executable file. Must be defined.\n   */\n  @Parameter(name = \"cliPath\", required = true)\n  private String cliPath;\n\n  /**\n   * The product on which you wish to execute the command:\n   * <ul>\n   * <li><b>rt</b>- JFrog Artifactory</li>\n   * <li><b>bt</b>- JFrog Bintray </li>\n   * <li><b>mc</b>- JFrog Mission Control</li>\n   * <li><b>xr</b>- JFrog Xray</li>\n   * </ul>\n   */\n  @Parameter(name = \"target\", defaultValue = \"rt\")\n  private String target = \"rt\";\n\n  /**\n   * The command to execute. Note that you can use either the full command name\n   * or its abbreviation.\n   */\n  @Parameter(name = \"command\", defaultValue = \"go\")\n  private String command = \"go\";\n\n  /**\n   * A set of arguments corresponding to the command.\n   */\n  @Parameter(name = \"arguments\")\n  private List<String> arguments = new ArrayList<>();\n\n  @Nonnull\n  @MustNotContainNull\n  public List<String> getArguments() {\n    return this.arguments;\n  }\n\n  @Nonnull\n  public String getCliPath() {\n    return this.cliPath;\n  }\n\n  @Nonnull\n  public String getTarget() {\n    return this.target;\n  }\n\n  @Nonnull\n  public String getCommand() {\n    return this.command;\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"jfrog\";\n  }\n\n  @Nonnull\n  @Override\n  protected ProcessExecutor prepareExecutor(@Nullable final ProxySettings proxySettings)\n      throws IOException, MojoFailureException, MojoExecutionException {\n    this.initConsoleBuffers();\n\n    final File goRoot = this.findGoRoot(proxySettings);\n    final String gobin = this.getGoBin();\n    final String gocache = this.getGoCache();\n    final File[] gopathParts = findGoPath(true);\n\n    final List<String> cliList = new ArrayList<>();\n\n    cliList.add(this.getCliPath());\n    cliList.add(this.getTarget());\n    cliList.add(this.getCommand());\n\n    this.getLog().info(\"JFrog CLI: \" + this.getCliPath());\n    this.getLog().info(\"   Target: \" + this.getTarget());\n    this.getLog().info(\"  Command: \" + this.getCommand());\n\n    cliList.addAll(this.getArguments());\n\n    this.getLog().debug(\"Prepared CLI: \" + cliList);\n\n    final ProcessExecutor result = new ProcessExecutor(cliList);\n\n    final File sourcesFile = getSources(isSourceFolderRequired());\n    logOptionally(\"GoLang project sources folder : \" + sourcesFile);\n\n    if (sourcesFile.isDirectory()) {\n      result.directory(sourcesFile);\n    }\n\n    this.registerEnvVars(result, goRoot, gobin, gocache, sourcesFile, gopathParts);\n    this.registerOutputBuffers(result);\n\n    return result;\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  @Override\n  public String[] getTailArguments() {\n    throw new NotImplementedException(\"Must not be called\");\n  }\n\n  @Nonnull\n  @Override\n  public String getGoCommand() {\n    throw new NotImplementedException(\"Must not be called\");\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  @Override\n  public String[] getCommandFlags() {\n    throw new NotImplementedException(\"Must not be called\");\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangListMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n\n/**\n * The Mojo wraps the 'list' command.\n *\n * @since 2.3.8\n */\n@Mojo(name = \"list\", defaultPhase = LifecyclePhase.PROCESS_SOURCES, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE)\npublic class GolangListMojo extends AbstractModuleAware {\n\n  /**\n   * Alternate format for the list, using the syntax of package template.\n   */\n  @Parameter(name = \"format\")\n  private String format = null;\n\n  /**\n   * The flag causes the package data to be printed in JSON format instead of using the template format.\n   */\n  @Parameter(name = \"json\")\n  private boolean json;\n\n  /**\n   * The flag causes list to list modules instead of packages.\n   */\n  @Parameter(name = \"listModules\")\n  private boolean listModules;\n\n  public boolean isListModules() {\n    return this.listModules;\n  }\n\n  public boolean isJson() {\n    return this.json;\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  @Override\n  protected String[] getAdditionalCommandFlags() {\n    final List<String> result = new ArrayList<>();\n    Collections.addAll(result, super.getAdditionalCommandFlags());\n\n    if (this.getFormat() != null && this.getFormat().trim().length() != 0) {\n      if (result.contains(\"-f\")) {\n        this.getLog().warn(\"Format ignored because detected already defined '-f' option\");\n      } else {\n        result.add(\"-f\");\n        result.add(this.getFormat().trim());\n      }\n    }\n\n    if (this.isJson()) {\n      if (result.contains(\"-f\")) {\n        this.getLog().warn(\"Since GoSDK 1.17, options '-f' and '-json' can't be presented together in the same time\");\n      }\n\n      if (result.contains(\"-json\")) {\n        this.getLog().warn(\"Json flag ignored because detected already defined '-json' option\");\n      } else {\n        result.add(\"-json\");\n      }\n    }\n\n    if (this.isListModules()) {\n      if (result.contains(\"-m\")) {\n        this.getLog().warn(\"Module flag ignored because detected already defined '-m' option\");\n      } else {\n        result.add(\"-m\");\n      }\n    }\n\n    return result.toArray(new String[0]);\n  }\n\n  @Nullable\n  public String getFormat() {\n    return this.format;\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"list\";\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"list\";\n  }\n\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangModMojo.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.Assertions;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\n\n/**\n * The Mojo wraps the 'mod' command.\n *\n * @since 2.3.3\n */\n@Mojo(name = \"mod\", defaultPhase = LifecyclePhase.NONE, threadSafe = true, requiresDependencyResolution = ResolutionScope.NONE)\npublic class GolangModMojo extends AbstractModuleAware {\n\n  /**\n   * Command to be executed. Must be defined.\n   */\n  @Parameter(name = \"command\", required = true)\n  private String command;\n\n  /**\n   * Arguments for the command.\n   */\n  @Parameter(name = \"arguments\")\n  private String[] arguments;\n\n  @Override\n  protected boolean doesNeedSessionLock() {\n    return this.getSession().isParallel();\n  }\n\n  @Override\n  public boolean isModuleMode() {\n    return true;\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  @Override\n  protected String[] getAdditionalCommandFlags() {\n    return new String[] {Assertions.assertNotNull(this.command)};\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  @Override\n  public String[] getTailArguments() {\n    return this.arguments == null ? new String[0] : this.arguments;\n  }\n\n  @Nonnull\n  public String getCommand() {\n    return this.command;\n  }\n\n  public void setCommand(@Nonnull final String value) {\n    this.command = value;\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"mod\";\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"mod\";\n  }\n\n  @Override\n  public boolean isEnforcePrintOutput() {\n    return true;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangMvnInstallMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.mvngolang.utils.MavenUtils;\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport org.apache.commons.io.FileUtils;\nimport org.apache.commons.io.FilenameUtils;\nimport org.apache.commons.lang3.NotImplementedException;\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.model.Model;\nimport org.apache.maven.model.Resource;\nimport org.apache.maven.model.io.xpp3.MavenXpp3Writer;\nimport org.apache.maven.plugins.annotations.*;\nimport org.apache.maven.project.MavenProject;\nimport org.apache.maven.project.MavenProjectHelper;\nimport org.apache.maven.shared.transfer.artifact.install.ArtifactInstaller;\nimport org.apache.maven.shared.transfer.repository.RepositoryManager;\nimport org.zeroturnaround.zip.ZipUtil;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.*;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Locale;\nimport java.util.Set;\n\nimport static com.igormaznitsa.mvngolang.utils.IOUtils.closeSilently;\n\n/**\n * The Mojo packs all found source and resource project folders and create new\n * artifact in the local repository.\n *\n * @since 2.1.0\n */\n@Mojo(name = \"mvninstall\", defaultPhase = LifecyclePhase.INSTALL, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE)\npublic class GolangMvnInstallMojo extends AbstractGoDependencyAwareMojo {\n\n  /**\n   * Special file contains list of mvn-golang artifacts which must be resolved\n   * and used in build.\n   *\n   * @since 2.3.0\n   */\n  public static final String MVNGOLANG_DEPENDENCIES_FILE = \".mvn-golang-dependencies\";\n\n  /**\n   * Special file contains list of project source and resource folders which\n   * play role in project build.\n   *\n   * @since 2.3.3\n   */\n  public static final String MVNGOLANG_BUILD_FOLDERS_FILE = \".mvn-golang-build-folders\";\n\n  @Component\n  protected RepositoryManager repositoryManager;\n\n  @Component\n  protected ArtifactInstaller installer;\n\n  @Component\n  protected MavenProjectHelper projectHelper;\n\n  /**\n   * Compression level of zip file. Must be 1..9\n   *\n   * @since 2.1.0\n   */\n  @Parameter(name = \"compression\", defaultValue = \"9\")\n  private int compression;\n\n  public int getCompression() {\n    return this.compression;\n  }\n\n  public void setCompression(final int level) {\n    this.compression = level;\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"install\";\n  }\n\n  @Override\n  public boolean isSkip() {\n    return super.isSkip()\n            || Boolean.parseBoolean(MavenUtils\n            .findProperty(this.getSession(), this.getProject(), \"maven.install.skip\", \"false\"));\n  }\n\n  @Override\n  protected boolean doMainBusiness(@Nullable final ProxySettings proxySettings,\n                                   final int maxAttempts)\n          throws IOException {\n    final File archive = compressProjectFiles();\n    this.getProject().getArtifact().setFile(archive);\n    return false;\n  }\n\n  private void safeCopyDirectory(@Nullable final String src, @Nonnull final File dst,\n                                 @Nullable @MustNotContainNull final List<File> dstList)\n          throws IOException {\n    if (!(src == null || src.isEmpty())) {\n      final File srcFile = new File(src);\n      if (srcFile.isDirectory()) {\n        if (getLog().isDebugEnabled()) {\n          getLog().debug(\n                  String.format(\"Copying %s => %s\", srcFile.getAbsolutePath(), dst.getAbsolutePath()));\n        }\n        FileUtils.copyDirectoryToDirectory(srcFile, dst);\n        if (dstList != null) {\n          dstList.add(new File(dst, srcFile.getName()));\n        }\n      }\n    }\n  }\n\n  private void saveEffectivePom(@Nonnull final File folder) throws IOException {\n    final Model model = this.getProject().getModel();\n    Writer writer = null;\n    try {\n      writer = new OutputStreamWriter(new FileOutputStream(new File(folder, \"pom.xml\"), false),\n              StandardCharsets.UTF_8);\n      new MavenXpp3Writer().write(writer, model);\n      if (getLog().isDebugEnabled()) {\n        getLog().debug(\"Effective pom has been written\");\n      }\n    } finally {\n      closeSilently(writer);\n    }\n  }\n\n  @Nonnull\n  private File compressProjectFiles() throws IOException {\n    final Artifact artifact = this.getProject().getArtifact();\n\n    File buildFolder = new File(this.getProject().getBuild().getDirectory());\n    if (!buildFolder.isDirectory() && !buildFolder.mkdirs()) {\n      this.getLog().error(\"Can't create build folder: \" + buildFolder);\n      throw new IOException(\"Can't create build folder: \" + buildFolder);\n    }\n\n    File resultZip = new File(buildFolder,\n            artifact.getArtifactId() + '-' + artifact.getVersion() + '.' + artifact.getType());\n    if (resultZip.isFile() && !resultZip.delete()) {\n      throw new IOException(\"Can't delete file : \" + resultZip);\n    }\n\n    final File folderToPack = new File(buildFolder, \".tmp_pack_folder_\" +\n            Long.toHexString(System.currentTimeMillis()).toUpperCase(Locale.ENGLISH));\n    if (folderToPack.isDirectory()) {\n      FileUtils.deleteDirectory(folderToPack);\n    }\n    if (!folderToPack.mkdirs()) {\n      throw new IOException(\"Can't create temp folder : \" + folderToPack);\n    }\n\n    final File mvnGolangDependencyListFile = new File(folderToPack, MVNGOLANG_DEPENDENCIES_FILE);\n    final File mvnGolangBuildFolderListFile = new File(folderToPack, MVNGOLANG_BUILD_FOLDERS_FILE);\n    try {\n      saveEffectivePom(folderToPack);\n\n      final List<File> buildFolders = new ArrayList<>();\n\n      FileUtils.copyFileToDirectory(this.getProject().getFile(), folderToPack);\n\n      safeCopyDirectory(this.getProject().getBuild().getTestSourceDirectory(), folderToPack, null);\n\n      for (final Resource res : this.getProject().getBuild().getTestResources()) {\n        safeCopyDirectory(res.getDirectory(), folderToPack, null);\n      }\n\n      for (final Resource res : this.getProject().getBuild().getResources()) {\n        safeCopyDirectory(res.getDirectory(), folderToPack, buildFolders);\n      }\n\n      safeCopyDirectory(this.getSources(false).getAbsolutePath(), folderToPack, buildFolders);\n\n      if (getLog().isDebugEnabled()) {\n        getLog().debug(String.format(\"Packing folder %s to %s\", folderToPack.getAbsolutePath(),\n                resultZip.getAbsolutePath()));\n      }\n\n      if (mvnGolangBuildFolderListFile.isFile()) {\n        this.getLog().warn(\n                \"Skip build source folder list descriptor create because detected existing one: \" +\n                        MVNGOLANG_BUILD_FOLDERS_FILE);\n      } else {\n        if (buildFolders.isEmpty()) {\n          this.getLog().warn(\n                  \"Skip build source folder list descriptor because there is not either source or resource folder for build\");\n        } else {\n          final String rooPath = FilenameUtils\n                  .separatorsToUnix(FilenameUtils.normalize(folderToPack.getAbsolutePath()));\n          final StringBuilder buffer = new StringBuilder();\n          for (final File f : buildFolders) {\n            String relativePath =\n                    FilenameUtils.separatorsToUnix(FilenameUtils.normalize(f.getAbsolutePath()))\n                            .substring(rooPath.length() + 1);\n            if (buffer.length() > 0) {\n              buffer.append('\\n');\n            }\n            this.getLog().debug(\"Add build folder into descriptor: \" + relativePath);\n            buffer.append(relativePath);\n          }\n          final String fileContent = buffer.toString();\n          this.getLog().debug(\n                  \"Formed list of mvn-golang project source and resource build folders\\n---------\" +\n                          fileContent + \"---------\");\n          FileUtils\n                  .writeStringToFile(mvnGolangBuildFolderListFile, fileContent, StandardCharsets.UTF_8);\n        }\n      }\n\n      if (mvnGolangDependencyListFile.isFile()) {\n        this.getLog().warn(\"Skip dependency descriptor create because detected existing one: \" +\n                MVNGOLANG_DEPENDENCIES_FILE);\n      } else {\n        final List<Artifact> golangDependencies = new ArrayList<>();\n        MavenProject currentProject = this.getProject();\n        while (currentProject != null && !Thread.currentThread().isInterrupted()) {\n          final Set<Artifact> dependencies = currentProject.getDependencyArtifacts();\n          if (dependencies != null) {\n            for (final Artifact a : dependencies) {\n              if (AbstractGolangMojo.GOARTIFACT_PACKAGING.equals(a.getType())) {\n                golangDependencies.add(a);\n              }\n            }\n          }\n          currentProject = currentProject.getParent();\n        }\n\n        final StringBuilder buffer = new StringBuilder();\n        for (final Artifact a : golangDependencies) {\n          buffer.append(MavenUtils.makeArtifactRecord(a)).append('\\n');\n        }\n        final String flagFileContent = buffer.toString();\n        this.getLog().debug(\n                \"Formed list of mvn-golang dependencies\\n---------\" + flagFileContent + \"---------\");\n        FileUtils.writeStringToFile(mvnGolangDependencyListFile, flagFileContent,\n                StandardCharsets.UTF_8);\n      }\n\n      this.getLog().debug(\"Restoring all backup go.mod in prepared folder to pack\");\n      restoreAllBackupGoMod(folderToPack);\n\n      ZipUtil.pack(folderToPack, resultZip, Math.min(9, Math.max(1, this.compression)));\n    } finally {\n      FileUtils.deleteQuietly(folderToPack);\n    }\n\n    return resultZip;\n  }\n\n  private void restoreAllBackupGoMod(@Nonnull final File folder) throws IOException {\n    final File backup = new File(folder, GO_MOD_FILE_NAME_BAK);\n    if (backup.isFile()) {\n      final File gomod = new File(folder, GO_MOD_FILE_NAME);\n      if (gomod.isFile() && !gomod.delete()) {\n        throw new IOException(\"Can't delete \" + gomod);\n      }\n      if (!backup.renameTo(gomod)) {\n        throw new IOException(\"Can't rename \" + backup);\n      }\n    }\n\n    final File[] foundFiles = folder.listFiles(\n        pathname -> pathname.isDirectory() && !Files.isSymbolicLink(pathname.toPath()));\n\n    if (foundFiles != null) {\n      for (final File f : foundFiles) {\n        restoreAllBackupGoMod(f);\n      }\n    }\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  @Override\n  public String[] getTailArguments() {\n    throw new NotImplementedException(\"Must not be called\");\n  }\n\n  @Nonnull\n  @Override\n  public String getGoCommand() {\n    throw new NotImplementedException(\"Must not be called\");\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  @Override\n  public String[] getCommandFlags() {\n    throw new NotImplementedException(\"Must not be called\");\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangRunMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.ArrayUtils;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\n\n/**\n * The Mojo allows to run a program, it wraps <b>run</b> command.\n *\n * @since 2.0.0\n */\n@SuppressWarnings(\"SpellCheckingInspection\")\n@Mojo(name = \"run\", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME)\npublic class GolangRunMojo extends AbstractModuleAware {\n\n  /**\n   * If the parameter is defined then <b>-exec</b> will be used with the parameter value.\n   *\n   * @since 2.0.0\n   */\n  @Parameter(name = \"xprog\")\n  private String xprog;\n\n  /**\n   * Command arguments. They follow package names in command line.\n   *\n   * @since 2.1.7\n   */\n  @Parameter(name = \"args\")\n  private String[] args;\n\n  /**\n   * Get command line arguments.\n   *\n   * @return array of arguments, must not be null\n   * @since 2.1.7\n   */\n  @Nonnull\n  @MustNotContainNull\n  public String[] getArgs() {\n    return this.args == null ? ArrayUtils.EMPTY_STRING_ARRAY : this.args.clone();\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  public String[] getTailArguments() {\n    final List<String> result = new ArrayList<>(Arrays.asList(super.getTailArguments()));\n    result.addAll(Arrays.asList(this.getArgs()));\n    return result.toArray(new String[0]);\n  }\n\n  @Override\n  public boolean isSourceFolderRequired() {\n    return true;\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  protected String[] getExtraBuildFlags() {\n    String[] result = ArrayUtils.EMPTY_STRING_ARRAY;\n    if (this.xprog != null) {\n      result = new String[] {\"-exec\", this.xprog};\n    }\n    return result;\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"run\";\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"run\";\n  }\n\n  @Override\n  public boolean isEnforcePrintOutput() {\n    return true;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangTestMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.ArrayUtils;\nimport com.igormaznitsa.meta.common.utils.GetUtils;\nimport com.igormaznitsa.mvngolang.utils.MavenUtils;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.File;\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * The Mojo wraps the 'test' command.\n */\n@Mojo(name = \"test\", defaultPhase = LifecyclePhase.TEST, threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST)\npublic class GolangTestMojo extends AbstractModuleAware {\n\n  /**\n   * List of test binary flags.\n   */\n  @Parameter(name = \"testFlags\")\n  private String[] testFlags;\n\n  @Nonnull\n  private String ensureGoExtension(@Nonnull final String name) {\n    return name.endsWith(\".go\") ? name : name + \".go\";\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"test\";\n  }\n\n  @Override\n  public boolean isSkip() {\n    return super.isSkip()\n        || Boolean.getBoolean(\"skipTests\")\n        || Boolean.parseBoolean(\n        MavenUtils.findProperty(this.getSession(), this.getProject(), \"maven.test.skip\", \"false\"));\n  }\n\n  @Override\n  @Nullable\n  @MustNotContainNull\n  protected String[] getDefaultPackages() {\n    final String definedTest = System.getProperty(\"test\");\n    if (definedTest != null) {\n      final int index = definedTest.indexOf('#');\n      final String[] name;\n      if (index >= 0) {\n        name = new String[] {definedTest.substring(0, index), definedTest.substring(index + 1)};\n      } else {\n        name = new String[] {definedTest};\n      }\n      final List<String> result = new ArrayList<>();\n      result.add(ensureGoExtension(name[0]));\n      if (definedTest.length() > 1) {\n        result.add(\"-run\");\n        result.add(name[1]);\n      }\n      return result.toArray(new String[0]);\n    } else {\n      return new String[] {'.' + File.separator + \"...\"};\n    }\n  }\n\n  @Override\n  public boolean isIgnoreErrorExitCode() {\n    return Boolean.parseBoolean(MavenUtils\n        .findProperty(this.getSession(), this.getProject(), \"maven.test.failure.ignore\", \"false\"))\n        || super.isIgnoreErrorExitCode();\n  }\n\n  @Nullable\n  @MustNotContainNull\n  public String[] getTestFlags() {\n    return this.testFlags == null ? null : this.testFlags.clone();\n  }\n\n  @Override\n  public boolean isSourceFolderRequired() {\n    return true;\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  public String[] getOptionalExtraTailArguments() {\n    return GetUtils.ensureNonNull(this.testFlags, ArrayUtils.EMPTY_STRING_ARRAY);\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"test\";\n  }\n\n  @Override\n  public boolean isEnforcePrintOutput() {\n    return true;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangToolMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.ArrayUtils;\nimport com.igormaznitsa.meta.common.utils.GetUtils;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\n/**\n * The Mojo wraps the 'tool' command.\n */\n@Mojo(name = \"tool\", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE)\npublic class GolangToolMojo extends AbstractGoDependencyAwareMojo {\n\n  /**\n   * The Command to be executed.\n   */\n  @Parameter(name = \"command\", required = true)\n  private String command;\n\n  /**\n   * Command arguments.\n   */\n  @Parameter(name = \"args\")\n  private String[] args;\n\n  @Nullable\n  @MustNotContainNull\n  public String[] getArgs() {\n    return this.args == null ? null : this.args.clone();\n  }\n\n  public void setArgs(@Nullable @MustNotContainNull final String[] value) {\n    this.args = value == null ? null : value.clone();\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"tool\";\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  public String[] getTailArguments() {\n    final List<String> result = new ArrayList<>();\n    result.add(this.command);\n    result.addAll(Arrays.asList(GetUtils.ensureNonNull(this.args, ArrayUtils.EMPTY_STRING_ARRAY)));\n    return result.toArray(new String[0]);\n  }\n\n  @Nonnull\n  public String getCommand() {\n    return this.command;\n  }\n\n  public void setCommand(@Nullable final String value) {\n    this.command = value;\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"tool\";\n  }\n\n  @Override\n  @Nonnull\n  @MustNotContainNull\n  public String[] getCommandFlags() {\n    return ArrayUtils.EMPTY_STRING_ARRAY;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/GolangVetMojo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.File;\n\n/**\n * The Mojo wraps the 'vet' command.\n */\n@Mojo(name = \"vet\", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE)\npublic class GolangVetMojo extends AbstractModuleAware {\n\n  @Override\n  @Nullable\n  @MustNotContainNull\n  protected String[] getDefaultPackages() {\n    return new String[]{'.' + File.separator + \"...\"};\n  }\n\n  @Nullable\n  @Override\n  protected String getSkipMojoPropertySuffix() {\n    return \"vet\";\n  }\n\n  @Override\n  @Nonnull\n  public String getGoCommand() {\n    return \"vet\";\n  }\n\n  @Override\n  public boolean isEnforcePrintOutput() {\n    return true;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/cvs/AbstractRepo.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.cvs;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.GetUtils;\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport java.io.ByteArrayOutputStream;\nimport java.io.File;\nimport java.io.IOException;\nimport java.nio.charset.Charset;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.commons.lang3.SystemUtils;\nimport org.apache.maven.plugin.logging.Log;\nimport org.zeroturnaround.exec.InvalidExitValueException;\nimport org.zeroturnaround.exec.ProcessExecutor;\nimport org.zeroturnaround.exec.ProcessResult;\n\npublic abstract class AbstractRepo {\n\n  private final String command;\n\n  public AbstractRepo(@Nonnull final String command) {\n    this.command = SystemUtils.IS_OS_WINDOWS ? command + \".exe\" : command;\n  }\n\n  @Nonnull\n  public String getCommand() {\n    return this.command;\n  }\n\n  public int execute(@Nullable String customCommand, @Nonnull final Log logger,\n                     @Nonnull final File cvsFolder,\n                     @Nonnull @MustNotContainNull final String... args) {\n    final List<String> cli = new ArrayList<>();\n    cli.add(GetUtils.findFirstNonNull(customCommand, this.command));\n    cli.addAll(Arrays.asList(args));\n\n    if (logger.isDebugEnabled()) {\n      logger.debug(\"Executing repo command : \" + cli);\n    }\n\n    final ByteArrayOutputStream errorStream = new ByteArrayOutputStream();\n    final ByteArrayOutputStream outStream = new ByteArrayOutputStream();\n\n    final ProcessExecutor executor = new ProcessExecutor(cli);\n\n    int result = -1;\n\n    try {\n      final ProcessResult processResult =\n          executor.directory(cvsFolder).redirectError(errorStream).redirectOutput(outStream)\n              .executeNoTimeout();\n      result = processResult.getExitValue();\n\n      if (logger.isDebugEnabled()) {\n        logger.debug(\"Exec.out.........................................\");\n        logger.debug(new String(errorStream.toByteArray(), Charset.defaultCharset()));\n        logger.debug(\".................................................\");\n      }\n\n      if (result != 0) {\n        logger.error(new String(errorStream.toByteArray(), Charset.defaultCharset()));\n      }\n\n    } catch (IOException | InterruptedException | InvalidExitValueException ex) {\n      if (ex instanceof InterruptedException) {\n        Thread.currentThread().interrupt();\n      }\n      logger.error(\"Unexpected error\", ex);\n    }\n\n    return result;\n  }\n\n  protected boolean checkResult(@Nonnull final Log logger, final int code) {\n    return code == 0;\n  }\n\n  public abstract boolean doesContainCVS(@Nonnull File folder);\n\n  public boolean prepareFolder(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                               @Nullable final String customExe, @Nonnull final File cvsFolder) {\n    return true;\n  }\n\n  public boolean processCVSForCustomOptions(\n      @Nonnull final Log logger,\n      @Nullable final ProxySettings proxy,\n      @Nonnull final File cvsFolder,\n      @Nullable final String customCommand,\n      @Nonnull @MustNotContainNull final String... options\n  ) {\n    logger.debug(\"customCvsCall: \" + Arrays.toString(options));\n    return checkResult(logger, execute(customCommand, logger, cvsFolder, options));\n  }\n\n  public abstract boolean processCVSRequisites(\n      @Nonnull final Log logger,\n      @Nullable final ProxySettings proxy,\n      @Nullable final String customCommand,\n      @Nonnull final File cvsFolder,\n      @Nullable final String branchId,\n      @Nullable final String tagId,\n      @Nullable final String revisionId\n  );\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/cvs/CVSType.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.cvs;\n\nimport java.io.File;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\n\npublic enum CVSType {\n  UNKNOWN(new CvsNone()),\n  GIT(new CvsGIT()),\n  HG(new CvsHG()),\n  SVN(new CvsSVN()),\n  BAZAAR(new CvsBZR());\n\n  private final AbstractRepo processor;\n\n  CVSType(@Nonnull final AbstractRepo processor) {\n    this.processor = processor;\n  }\n\n  @Nonnull\n  public static CVSType investigateFolder(@Nullable final File folder) {\n    CVSType result = UNKNOWN;\n    if (folder != null && folder.isDirectory()) {\n      for (final CVSType t : values()) {\n        if (t.getProcessor().doesContainCVS(folder)) {\n          result = t;\n          break;\n        }\n      }\n    }\n    return result;\n  }\n\n  @Nonnull\n  public AbstractRepo getProcessor() {\n    return this.processor;\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/cvs/CvsBZR.java",
    "content": "/*\n * Copyright 2017 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.cvs;\n\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport java.io.File;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.maven.plugin.logging.Log;\n\npublic class CvsBZR extends AbstractRepo {\n\n  public CvsBZR() {\n    super(\"bzr\");\n  }\n\n  @Override\n  public boolean doesContainCVS(@Nonnull final File folder) {\n    return new File(folder, \".bzr\").isDirectory();\n  }\n\n  @Override\n  public boolean processCVSRequisites(\n      @Nonnull final Log logger,\n      @Nullable final ProxySettings proxy,\n      @Nullable final String customCommand,\n      @Nonnull final File cvsFolder,\n      @Nullable final String branchId,\n      @Nullable final String tagId,\n      @Nullable final String revisionId\n  ) {\n    boolean noError = true;\n\n    if (branchId != null) {\n      noError &= upToBranch(logger, proxy, customCommand, cvsFolder, branchId);\n    }\n\n    if (noError && tagId != null) {\n      noError &= upToTag(logger, proxy, customCommand, cvsFolder, tagId);\n    }\n\n    if (noError && revisionId != null) {\n      noError &= upToRevision(logger, proxy, customCommand, cvsFolder, revisionId);\n    }\n\n    return noError;\n  }\n\n  private boolean upToBranch(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                             @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                             @Nonnull final String branchId) {\n    logger.debug(\"upToBranch : \" + branchId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"switch\", \"--force\", branchId));\n  }\n\n  private boolean upToTag(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                          @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                          @Nonnull final String tagId) {\n    logger.debug(\"upToTag : \" + tagId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"switch\", \"--force\", tagId));\n  }\n\n  private boolean upToRevision(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                               @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                               @Nonnull final String revisionId) {\n    logger.debug(\"upToRevision : \" + revisionId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"switch\", \"--force\", \"--revision\", revisionId));\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/cvs/CvsGIT.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.cvs;\n\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport java.io.File;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.maven.plugin.logging.Log;\n\nclass CvsGIT extends AbstractRepo {\n\n  CvsGIT() {\n    super(\"git\");\n  }\n\n  @Override\n  public boolean doesContainCVS(@Nonnull final File folder) {\n    return new File(folder, \".git\").isDirectory();\n  }\n\n  @Override\n  public boolean processCVSRequisites(\n      @Nonnull final Log logger,\n      @Nullable final ProxySettings proxy,\n      @Nullable final String customCommand,\n      @Nonnull final File cvsFolder,\n      @Nullable final String branchId,\n      @Nullable final String tagId,\n      @Nullable final String revisionId\n  ) {\n    boolean notError = true;\n\n    if (branchId != null) {\n      notError &= upToBranch(logger, proxy, customCommand, cvsFolder, branchId);\n    }\n\n    if (notError && tagId != null) {\n      if (branchId == null) {\n        notError &= upToBranch(logger, proxy, customCommand, cvsFolder, \"master\");\n      }\n\n      if (notError) {\n        notError &= upToTag(logger, proxy, customCommand, cvsFolder, tagId);\n      }\n    }\n\n    if (notError && revisionId != null) {\n      notError &= upToRevision(logger, proxy, customCommand, cvsFolder, revisionId);\n    }\n\n    return notError;\n  }\n\n  private boolean upToBranch(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                             @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                             @Nonnull final String branchId) {\n    logger.debug(\"upToBranch: \" + branchId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"checkout\", \"--quiet\", \"--force\", branchId));\n  }\n\n  private boolean upToTag(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                          @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                          @Nonnull final String tagId) {\n    logger.debug(\"upToTag: \" + tagId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"checkout\", \"--quiet\", \"--force\",\n            \"tags/\" + tagId));\n  }\n\n  private boolean upToRevision(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                               @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                               @Nonnull final String revisionId) {\n    logger.debug(\"upToRevision: \" + revisionId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"checkout\", \"--quiet\", \"--force\", revisionId));\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/cvs/CvsHG.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.cvs;\n\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport java.io.File;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.maven.plugin.logging.Log;\n\nclass CvsHG extends AbstractRepo {\n\n  CvsHG() {\n    super(\"hg\");\n  }\n\n  @Override\n  public boolean doesContainCVS(@Nonnull final File folder) {\n    return new File(folder, \".hg\").isDirectory();\n  }\n\n  @Override\n  public boolean processCVSRequisites(\n      @Nonnull final Log logger,\n      @Nullable final ProxySettings proxy,\n      @Nullable final String customCommand,\n      @Nonnull final File cvsFolder,\n      @Nullable final String branchId,\n      @Nullable final String tagId,\n      @Nullable final String revisionId\n  ) {\n    boolean noError = true;\n\n    if (branchId != null) {\n      noError &= upToBranch(logger, proxy, customCommand, cvsFolder, branchId);\n    }\n\n    if (noError && tagId != null) {\n      noError &= upToTag(logger, proxy, customCommand, cvsFolder, tagId);\n    }\n\n    if (noError && revisionId != null) {\n      noError &= upToRevision(logger, proxy, customCommand, cvsFolder, revisionId);\n    }\n\n    return noError;\n  }\n\n\n  private boolean upToBranch(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                             @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                             @Nonnull final String branchId) {\n    logger.debug(\"upToBranch: \" + branchId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"update\", \"--clean\", branchId));\n  }\n\n  private boolean upToTag(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                          @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                          @Nonnull final String tagId) {\n    logger.debug(\"upToTag: \" + tagId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"update\", \"--clean\", tagId));\n  }\n\n  private boolean upToRevision(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                               @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                               @Nonnull final String revisionId) {\n    logger.debug(\"upToRevision: \" + revisionId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"update\", \"--clean\", \"--rev\", revisionId));\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/cvs/CvsNone.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.cvs;\n\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport java.io.File;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.maven.plugin.logging.Log;\n\nclass CvsNone extends AbstractRepo {\n\n  CvsNone() {\n    super(\"%%%+++none+++%%%\");\n  }\n\n  @Override\n  public boolean processCVSRequisites(\n      @Nonnull final Log logger,\n      @Nullable final ProxySettings proxy,\n      @Nullable final String customCommand,\n      @Nonnull final File cvsFolder,\n      @Nullable final String branchId,\n      @Nullable final String tagId,\n      @Nullable final String revisionId\n  ) {\n    return false;\n  }\n\n  @Override\n  public boolean doesContainCVS(@Nonnull File folder) {\n    return false;\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/cvs/CvsSVN.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.cvs;\n\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport java.io.File;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.maven.plugin.logging.Log;\n\nclass CvsSVN extends AbstractRepo {\n\n  CvsSVN() {\n    super(\"svn\");\n  }\n\n  @Override\n  public boolean processCVSRequisites(\n      @Nonnull final Log logger,\n      @Nullable final ProxySettings proxy,\n      @Nullable final String customCommand,\n      @Nonnull final File cvsFolder,\n      @Nullable final String branchId,\n      @Nullable final String tagId,\n      @Nullable final String revisionId\n  ) {\n    boolean noError = true;\n\n    if (branchId != null) {\n      noError &= upToBranch(logger, proxy, customCommand, cvsFolder, branchId);\n    }\n\n    if (noError && tagId != null) {\n      noError &= upToTag(logger, proxy, customCommand, cvsFolder, tagId);\n    }\n\n    if (noError && revisionId != null) {\n      noError &= upToRevision(logger, proxy, customCommand, cvsFolder, revisionId);\n    }\n\n    return noError;\n  }\n\n\n  @Override\n  public boolean doesContainCVS(@Nonnull final File folder) {\n    return new File(folder, \".svn\").isDirectory();\n  }\n\n  private boolean upToBranch(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                             @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                             @Nonnull final String branchId) {\n    logger.debug(\"upToBranch : \" + branchId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"switch\", \"--accept\", \"theirs-full\", \"--force\",\n            branchId));\n  }\n\n  private boolean upToTag(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                          @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                          @Nonnull final String tagId) {\n    logger.debug(\"upToTag : \" + tagId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"switch\", \"--accept\", \"theirs-full\", \"--force\",\n            tagId));\n  }\n\n  private boolean upToRevision(@Nonnull final Log logger, @Nullable final ProxySettings proxy,\n                               @Nullable final String customCommand, @Nonnull final File cvsFolder,\n                               @Nonnull final String revisionId) {\n    logger.debug(\"upToRevision : \" + revisionId);\n    return checkResult(logger,\n        execute(customCommand, logger, cvsFolder, \"switch\", \"--accept\", \"theirs-full\", \"--force\",\n            \"--revision\", revisionId));\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/GoMod.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.Assertions;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\n\npublic final class GoMod {\n\n  private static final Pattern TOKENIZER =\n      Pattern.compile(\"(\\\\/\\\\/|\\\\\\\"[^\\\\\\\"]+\\\\\\\"|[<>=\\\\w.+\\\\-/\\\\\\\\]+|[<>=-]+|\\\\(|\\\\)|[\\\\s\\\\n]+)\");\n  private final List<GoModItem> items;\n\n  private GoMod(@Nonnull @MustNotContainNull final List<GoModItem> items) {\n    final List<GoModItem> newList = new ArrayList<>(items);\n    Collections.sort(newList);\n    this.items = newList;\n  }\n\n  @Nonnull\n  private static String quoteIfHasSpace(@Nonnull final String str) {\n    return str.contains(\" \") ? '\\\"' + str + '\\\"' : str;\n  }\n\n  @Nonnull\n  private static String ensureNoQuoting(@Nonnull final String text) {\n    return text.startsWith(\"\\\"\") ? text.substring(1, text.length() - 1) : text;\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  private static List<ModuleInfo> extractModuleInfo(\n      @Nonnull @MustNotContainNull final List<String> tokens,\n      @Nonnull @MustNotContainNull final String... separators) {\n    final List<ModuleInfo> result = new ArrayList<>();\n    final List<String> tokenBuffer = new ArrayList<>(tokens);\n    final List<String> accum = new ArrayList<>();\n\n    while (!tokenBuffer.isEmpty()) {\n      final String next = tokenBuffer.remove(0);\n      boolean separator = false;\n      for (final String s : separators) {\n        if (s.equals(next)) {\n          separator = true;\n          break;\n        }\n      }\n      if (separator) {\n        switch (accum.size()) {\n          case 1: {\n            result.add(new ModuleInfo(accum.remove(0)));\n          }\n          break;\n          case 2: {\n            final String name = accum.remove(0);\n            final String version = accum.remove(0);\n            result.add(new ModuleInfo(name, version));\n          }\n          break;\n          default:\n            throw new IllegalArgumentException(\"Can't extract module info from tokens: \" + tokens);\n        }\n      } else {\n        accum.add(next);\n      }\n    }\n\n    switch (accum.size()) {\n      case 1: {\n        result.add(new ModuleInfo(accum.remove(0)));\n      }\n      break;\n      case 2: {\n        final String name = accum.remove(0);\n        final String version = accum.remove(0);\n        result.add(new ModuleInfo(name, version));\n      }\n      break;\n      default:\n        throw new IllegalArgumentException(\"Can't extract module info from tokens: \" + tokens);\n    }\n\n    return result;\n  }\n\n  @Nonnull\n  public static GoMod from(@Nonnull final String str) {\n    final List<GoModItem> foundItems = new ArrayList<>();\n\n    final Matcher matcher = TOKENIZER.matcher(str);\n\n    ParserState state = ParserState.FIND;\n\n    boolean findEol = false;\n    boolean bracket = false;\n\n    final List<String> tokenList = new ArrayList<>();\n\n    String customTokenName = null;\n\n    while (matcher.find()) {\n      final String token = matcher.group(1);\n      if (findEol) {\n        if (token.contains(\"\\n\")) {\n          findEol = false;\n          state = bracket ? state : ParserState.FIND;\n        }\n      } else {\n        switch (state) {\n          case FIND: {\n            tokenList.clear();\n            switch (token) {\n              case \"module\": {\n                state = ParserState.MODULE;\n              }\n              break;\n              case \"exclude\": {\n                state = ParserState.EXCLUDE;\n              }\n              break;\n              case \"replace\": {\n                state = ParserState.REPLACE;\n              }\n              break;\n              case \"require\": {\n                state = ParserState.REQUIRE;\n              }\n              break;\n              default: {\n                if (\"//\".equals(token)) {\n                  findEol = true;\n                } else if (!token.trim().isEmpty()) {\n                  state = ParserState.CUSTOM;\n                  customTokenName = token;\n                }\n              }\n              break;\n            }\n          }\n          break;\n          case CUSTOM: {\n            if (\"//\".equals(token)) {\n              if (!bracket) {\n                foundItems.add(new GoCustom(customTokenName, tokenList.toArray(new String[0])));\n                foundItems.clear();\n                customTokenName = null;\n                state = ParserState.FIND;\n              }\n            } else {\n              if (\"(\".equals(token)) {\n                if (bracket) {\n                  throw new IllegalArgumentException(\"Duplicated opening bracket in \" + state);\n                }\n                bracket = true;\n              } else if (\")\".equals(token)) {\n                if (!bracket) {\n                  throw new IllegalArgumentException(\"Unexpected closing bracket in \" + state);\n                }\n                bracket = false;\n                foundItems.add(new GoCustom(customTokenName, tokenList.toArray(new String[0])));\n                foundItems.clear();\n                customTokenName = null;\n                state = ParserState.FIND;\n              } else if (token.contains(\"\\n\")) {\n                if (!bracket) {\n                  state = ParserState.FIND;\n                  foundItems.add(new GoCustom(customTokenName, tokenList.toArray(new String[0])));\n                }\n              } else {\n                if (!token.trim().isEmpty()) {\n                  tokenList.add(token);\n                }\n              }\n            }\n          }\n          break;\n          case MODULE:\n          case EXCLUDE:\n          case REPLACE:\n          case REQUIRE: {\n            if (\"(\".equals(token)) {\n              if (bracket) {\n                throw new IllegalArgumentException(\"Duplicated opening bracket in \" + state);\n              }\n              if (!tokenList.isEmpty()) {\n                throw new IllegalArgumentException(\n                    \"Unexpected tokens \" + tokenList + \" before bracket in \" + state);\n              }\n              bracket = true;\n            } else {\n              final boolean processTokenList;\n              ParserState nextState = state;\n\n              if (\")\".equals(token)) {\n                if (!bracket) {\n                  throw new IllegalArgumentException(\"Unexpected closing bracket in \" + state);\n                }\n                bracket = false;\n                processTokenList = !tokenList.isEmpty();\n                nextState = ParserState.FIND;\n              } else if (\"//\".equals(token)) {\n                findEol = true;\n                processTokenList = !bracket || !tokenList.isEmpty();\n                nextState = bracket ? state : ParserState.FIND;\n              } else if (token.contains(\"\\n\")) {\n                processTokenList = !bracket || !tokenList.isEmpty();\n                nextState = bracket ? state : ParserState.FIND;\n              } else {\n                if (!token.trim().isEmpty()) {\n                  tokenList.add(ensureNoQuoting(token));\n                }\n                processTokenList = false;\n              }\n\n              if (processTokenList) {\n                switch (state) {\n                  case MODULE: {\n                    final List<ModuleInfo> moduleInfos = extractModuleInfo(tokenList);\n                    tokenList.clear();\n                    while (!moduleInfos.isEmpty()) {\n                      foundItems.add(new GoModule(moduleInfos.remove(0)));\n                    }\n                  }\n                  break;\n                  case REQUIRE: {\n                    final List<ModuleInfo> moduleInfos = extractModuleInfo(tokenList);\n                    tokenList.clear();\n                    while (!moduleInfos.isEmpty()) {\n                      foundItems.add(new GoRequire(moduleInfos.remove(0)));\n                    }\n                  }\n                  break;\n                  case EXCLUDE: {\n                    final List<ModuleInfo> moduleInfos = extractModuleInfo(tokenList);\n                    tokenList.clear();\n                    while (!moduleInfos.isEmpty()) {\n                      foundItems.add(new GoExclude(moduleInfos.remove(0)));\n                    }\n                  }\n                  break;\n                  case REPLACE: {\n                    final List<ModuleInfo> moduleInfos = extractModuleInfo(tokenList, \"=>\");\n                    tokenList.clear();\n                    while (!moduleInfos.isEmpty()) {\n                      final ModuleInfo from = moduleInfos.remove(0);\n                      if (moduleInfos.isEmpty()) {\n                        throw new IllegalArgumentException(\"Can't find target in replace\");\n                      }\n                      final ModuleInfo to = moduleInfos.remove(0);\n                      foundItems.add(new GoReplace(from, to));\n                    }\n                  }\n                  break;\n                  default:\n                    throw new Error(\"Unexpected: \" + state);\n                }\n              }\n\n              state = nextState;\n            }\n          }\n          break;\n        }\n      }\n    }\n\n    if (!tokenList.isEmpty()) {\n      switch (state) {\n        case MODULE: {\n          final List<ModuleInfo> moduleInfos = extractModuleInfo(tokenList);\n          tokenList.clear();\n          while (!moduleInfos.isEmpty()) {\n            foundItems.add(new GoModule(moduleInfos.remove(0)));\n          }\n        }\n        break;\n        case REQUIRE: {\n          final List<ModuleInfo> moduleInfos = extractModuleInfo(tokenList);\n          tokenList.clear();\n          while (!moduleInfos.isEmpty()) {\n            foundItems.add(new GoRequire(moduleInfos.remove(0)));\n          }\n        }\n        break;\n        case EXCLUDE: {\n          final List<ModuleInfo> moduleInfos = extractModuleInfo(tokenList);\n          tokenList.clear();\n          while (!moduleInfos.isEmpty()) {\n            foundItems.add(new GoExclude(moduleInfos.remove(0)));\n          }\n        }\n        break;\n        case REPLACE: {\n          final List<ModuleInfo> moduleInfos = extractModuleInfo(tokenList, \"=>\");\n          tokenList.clear();\n          while (!moduleInfos.isEmpty()) {\n            final ModuleInfo from = moduleInfos.remove(0);\n            if (moduleInfos.isEmpty()) {\n              throw new IllegalArgumentException(\"Can't find target in replace\");\n            }\n            final ModuleInfo to = moduleInfos.remove(0);\n            foundItems.add(new GoReplace(from, to));\n          }\n        }\n        break;\n        case CUSTOM: {\n          foundItems.add(new GoCustom(customTokenName, tokenList.toArray(new String[0])));\n        }\n        break;\n        default:\n          break;\n      }\n    }\n\n    return new GoMod(foundItems);\n  }\n\n  @Override\n  public boolean equals(@Nullable final Object that) {\n    if (that == null) {\n      return false;\n    }\n    if (that == this) {\n      return true;\n    }\n\n    if (that instanceof GoMod) {\n      final GoMod thatGoMod = (GoMod) that;\n      if (this.items.size() != thatGoMod.items.size()) {\n        return false;\n      }\n      for (int i = 0; i < this.items.size(); i++) {\n        if (!this.items.get(i).equals(thatGoMod.items.get(i))) {\n          return false;\n        }\n      }\n      return true;\n    }\n    return false;\n  }\n\n  @Override\n  public int hashCode() {\n    return 31;\n  }\n\n  @Nonnull\n  public GoMod addItem(@Nonnull final GoModItem item) {\n    this.items.add(item);\n    Collections.sort(this.items);\n    return this;\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  public <T extends GoModItem> List<T> find(@Nonnull final Class<T> klass) {\n    final List<T> result = new ArrayList<>();\n\n    for (final GoModItem i : this.items) {\n      if (klass == i.getClass()) {\n        result.add(klass.cast(i));\n      }\n    }\n\n    return result;\n  }\n\n  public int size() {\n    return this.items.size();\n  }\n\n  @Nonnull\n  @Override\n  public String toString() {\n    final StringBuilder buffer = new StringBuilder();\n    for (final GoModItem i : this.items) {\n      if (buffer.length() > 0) {\n        buffer.append('\\n');\n      }\n      buffer.append(i.toString());\n    }\n    return buffer.toString();\n  }\n\n  public boolean hasReplaceFor(@Nonnull final String moduleName, @Nullable final String version) {\n    boolean found = false;\n    for (final GoModItem r : this.items) {\n      if (r instanceof GoReplace) {\n        final GoReplace require = (GoReplace) r;\n        if (moduleName.equals(require.getModule().getName()) &&\n            (version == null || version.equals(require.getModule().getVersion()))) {\n          found = true;\n        }\n      }\n    }\n    return found;\n  }\n\n  public boolean hasRequireFor(@Nonnull final String moduleName, @Nullable final String version) {\n    boolean found = false;\n    for (final GoModItem r : this.items) {\n      if (r instanceof GoRequire) {\n        final GoRequire require = (GoRequire) r;\n        if (moduleName.equals(require.getModuleInfo().getName()) &&\n            (version == null || version.equals(require.getModuleInfo().getVersion()))) {\n          found = true;\n        }\n      }\n    }\n    return found;\n  }\n\n  @Nullable\n  public String getModule() {\n    final List<GoModule> found = this.find(GoModule.class);\n    return found.isEmpty() ? null : found.get(0).getModuleInfo().getName();\n  }\n\n  private enum ParserState {\n    FIND,\n    MODULE,\n    REQUIRE,\n    REPLACE,\n    EXCLUDE,\n    CUSTOM\n  }\n\n  public static abstract class GoModItem implements Comparable<GoModItem> {\n\n    @Override\n    public int compareTo(@Nonnull final GoModItem that) {\n      int result = Integer.compare(this.getPriority(), that.getPriority());\n      if (result == 0) {\n        result = this.toString().compareTo(that.toString());\n      }\n      return result;\n    }\n\n    public abstract int getPriority();\n\n    @Override\n    public abstract boolean equals(@Nullable Object that);\n\n    @Override\n    public abstract int hashCode();\n  }\n\n  public final static class ModuleInfo {\n\n    private final String name;\n    private final String version;\n\n    public ModuleInfo(@Nonnull final String name) {\n      this.name = Assertions.assertNotNull(name);\n      this.version = null;\n    }\n\n    public ModuleInfo(@Nonnull final String name, @Nullable final String version) {\n      this.name = Assertions.assertNotNull(name);\n      this.version = version;\n    }\n\n    @Nonnull\n    public String getName() {\n      return this.name;\n    }\n\n    @Nullable\n    public String getVersion() {\n      return this.version;\n    }\n\n    @Override\n    public boolean equals(@Nullable final Object that) {\n      if (that == null) {\n        return false;\n      }\n      if (that == this) {\n        return true;\n      }\n\n      if (that instanceof ModuleInfo) {\n        final ModuleInfo thatModuleInfo = (ModuleInfo) that;\n        return this.name.equals(thatModuleInfo.name) &&\n            (Objects.equals(this.version, thatModuleInfo.version));\n      }\n      return false;\n    }\n\n    @Override\n    public int hashCode() {\n      return this.name.hashCode() ^ (this.version == null ? 0 : this.version.hashCode());\n    }\n\n    @Nonnull\n    @Override\n    public String toString() {\n      return quoteIfHasSpace(this.name) +\n          (this.version == null ? \"\" : \" \" + quoteIfHasSpace(this.version));\n    }\n  }\n\n  public static final class GoModule extends GoModItem {\n\n    private final ModuleInfo moduleInfo;\n\n    public GoModule(@Nonnull final ModuleInfo module) {\n      this.moduleInfo = Assertions.assertNotNull(module);\n    }\n\n    @Override\n    public boolean equals(@Nullable final Object that) {\n      if (that == null) {\n        return false;\n      }\n      if (that == this) {\n        return true;\n      }\n\n      if (that instanceof GoModule) {\n        return this.moduleInfo.equals(((GoModule) that).moduleInfo);\n      }\n      return false;\n    }\n\n    @Override\n    public int hashCode() {\n      return this.moduleInfo.hashCode();\n    }\n\n    @Nonnull\n    public ModuleInfo getModuleInfo() {\n      return this.moduleInfo;\n    }\n\n    @Override\n    @Nonnull\n    public String toString() {\n      return \"module \" + this.moduleInfo;\n    }\n\n    @Override\n    public int getPriority() {\n      return 0;\n    }\n  }\n\n  public static class GoRequire extends GoModItem {\n\n    private final ModuleInfo moduleInfo;\n\n    public GoRequire(@Nonnull final ModuleInfo moduleInfo) {\n      this.moduleInfo = Assertions.assertNotNull(moduleInfo);\n    }\n\n    @Override\n    public boolean equals(@Nullable final Object that) {\n      if (that == null) {\n        return false;\n      }\n      if (that == this) {\n        return true;\n      }\n\n      if (that instanceof GoRequire) {\n        return this.moduleInfo.equals(((GoRequire) that).moduleInfo);\n      }\n      return false;\n    }\n\n    @Override\n    public int hashCode() {\n      return this.moduleInfo.hashCode();\n    }\n\n    @Nonnull\n    public ModuleInfo getModuleInfo() {\n      return this.moduleInfo;\n    }\n\n    @Nonnull\n    @Override\n    public String toString() {\n      return \"require \" + this.moduleInfo;\n    }\n\n    @Override\n    public int getPriority() {\n      return 1;\n    }\n  }\n\n  public static final class GoCustom extends GoModItem {\n\n    private final String name;\n    private final String[] tokens;\n\n    public GoCustom(@Nonnull final String name,\n                    @Nonnull @MustNotContainNull final String[] tokens) {\n      this.name = Assertions.assertNotNull(name);\n      this.tokens = tokens.clone();\n    }\n\n    @Override\n    public boolean equals(@Nullable final Object that) {\n      if (that == null) {\n        return false;\n      }\n      if (that == this) {\n        return true;\n      }\n\n      if (that instanceof GoCustom) {\n        return this.name.equals(((GoCustom) that).name) &&\n            Arrays.equals(this.tokens, ((GoCustom) that).tokens);\n      }\n      return false;\n    }\n\n    @Override\n    public int hashCode() {\n      return this.name.hashCode();\n    }\n\n    @Nonnull\n    @Override\n    public String toString() {\n      final StringBuilder result = new StringBuilder();\n      result.append(name);\n      for (final String t : tokens) {\n        if (\")\".equals(t)) {\n          result.append('\\n');\n        }\n        result.append(' ').append(quoteIfHasSpace(t));\n        if (\"(\".equals(t)) {\n          result.append('\\n');\n        }\n      }\n      return result.toString();\n    }\n\n    @Override\n    public int getPriority() {\n      return 100;\n    }\n  }\n\n  public static final class GoReplace extends GoModItem {\n\n    private final ModuleInfo module;\n    private final ModuleInfo replacement;\n\n    public GoReplace(@Nonnull final ModuleInfo module, @Nonnull final ModuleInfo replacement) {\n      this.module = Assertions.assertNotNull(module);\n      this.replacement = Assertions.assertNotNull(replacement);\n    }\n\n    @Override\n    public boolean equals(@Nullable final Object that) {\n      if (that == null) {\n        return false;\n      }\n      if (that == this) {\n        return true;\n      }\n\n      if (that instanceof GoReplace) {\n        return this.module.equals(((GoReplace) that).module) &&\n            this.replacement.equals(((GoReplace) that).replacement);\n      }\n      return false;\n    }\n\n    @Override\n    public int hashCode() {\n      return this.module.hashCode() ^ this.replacement.hashCode();\n    }\n\n    @Nonnull\n    public ModuleInfo getModule() {\n      return this.module;\n    }\n\n    @Nonnull\n    public ModuleInfo getReplacement() {\n      return this.replacement;\n    }\n\n    @Nonnull\n    @Override\n    public String toString() {\n      return \"replace \" + this.module + \" => \" + this.replacement;\n    }\n\n    @Override\n    public int getPriority() {\n      return 2;\n    }\n\n  }\n\n  public static final class GoExclude extends GoModItem {\n\n    private final ModuleInfo module;\n\n    public GoExclude(@Nonnull final ModuleInfo module) {\n      this.module = Assertions.assertNotNull(module);\n    }\n\n    @Nonnull\n    public ModuleInfo getModule() {\n      return this.module;\n    }\n\n    @Override\n    public boolean equals(@Nullable final Object that) {\n      if (that == null) {\n        return false;\n      }\n      if (that == this) {\n        return true;\n      }\n\n      if (that instanceof GoExclude) {\n        return this.module.equals(((GoExclude) that).module);\n      }\n      return false;\n    }\n\n    @Override\n    public int hashCode() {\n      return this.module.hashCode();\n    }\n\n    @Nonnull\n    @Override\n    public String toString() {\n      return \"exclude \" + this.module;\n    }\n\n    @Override\n    public int getPriority() {\n      return 3;\n    }\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/IOUtils.java",
    "content": "/*\n * Copyright 2017 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport com.igormaznitsa.meta.annotation.MayContainNull;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.Closeable;\nimport java.io.File;\nimport java.io.IOException;\nimport java.util.HashSet;\nimport java.util.Set;\n\nimport static java.lang.Math.max;\nimport static java.lang.Math.min;\nimport static java.lang.System.out;\n\n/**\n * Auxiliary class to collect methods for work with IO.\n *\n * @since 2.1.7\n */\npublic final class IOUtils {\n\n  private IOUtils() {\n\n  }\n\n  /**\n   * Print text progress bar.\n   *\n   * @param text             title of the bar\n   * @param value            value to be rendered\n   * @param maxValue         max value to be rendered\n   * @param progressBarWidth width of bar\n   * @param lastValue        value which was rendered last time, if the same then it will not be rendered\n   * @return rendered value\n   * @since 2.3.0\n   */\n  public static int printTextProgressBar(@Nonnull final String text, final long value,\n                                         final long maxValue, final int progressBarWidth,\n                                         final int lastValue) {\n    final StringBuilder builder = new StringBuilder();\n    builder.append(\"\\r\\u001B[?25l\");\n    builder.append(text);\n    builder.append(\"[\");\n\n    final int progress = max(0, min(progressBarWidth,\n        (int) Math.round(progressBarWidth * ((double) value / (double) maxValue))));\n\n    for (int i = 0; i < progress; i++) {\n      builder.append('▒');\n    }\n    for (int i = progress; i < progressBarWidth; i++) {\n      builder.append('-');\n    }\n    builder.append(\"]\\u001B[?25h\");\n\n    if (progress != lastValue) {\n      out.print(builder);\n      out.flush();\n    }\n\n    return progress;\n  }\n\n  /**\n   * Make file path appropriate for current OS.\n   *\n   * @param files files which will be added in the path\n   * @return joined file path with OS file separator\n   * @since 2.1.7\n   */\n  @Nonnull\n  public static String makeOsFilePathWithoutDuplications(\n      @Nonnull @MayContainNull final File[] files) {\n    final StringBuilder result = new StringBuilder();\n    final Set<File> alreadyAdded = new HashSet<>();\n\n    for (final File f : files) {\n      if (f == null || alreadyAdded.contains(f)) {\n        continue;\n      }\n      alreadyAdded.add(f);\n      if (result.length() > 0) {\n        result.append(File.pathSeparatorChar);\n      }\n      result.append(f.getAbsolutePath());\n    }\n\n    return result.toString();\n  }\n\n\n  /**\n   * Make file path from provided strings\n   *\n   * @param paths path elements\n   * @return joined file path with OS file separator\n   * @since 2.1.7\n   */\n  @Nonnull\n  public static String makeOsFilePathWithoutDuplications(\n      @Nonnull @MayContainNull final String... paths) {\n    final StringBuilder result = new StringBuilder();\n    final Set<String> alreadyAdded = new HashSet<>();\n\n    for (final String s : paths) {\n      if (s != null && !s.isEmpty() && !alreadyAdded.contains(s)) {\n        alreadyAdded.add(s);\n        if (result.length() > 0) {\n          result.append(File.pathSeparatorChar);\n        }\n        result.append(s);\n      }\n    }\n    return result.toString();\n  }\n\n  /**\n   * Close a closeable object quietly, added because such method in APACHE-IO\n   * has been deprecated\n   *\n   * @param closeable object to be closed\n   */\n  public static void closeSilently(@Nullable final Closeable closeable) {\n    try {\n      if (closeable != null) {\n        closeable.close();\n      }\n    } catch (final IOException ignoring) {\n      // EXPECTED DO NOTHING\n    }\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/MavenUtils.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.GetUtils;\nimport com.igormaznitsa.mvngolang.AbstractGolangMojo;\nimport com.igormaznitsa.mvngolang.GolangMvnInstallMojo;\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.artifact.DefaultArtifact;\nimport org.apache.maven.artifact.handler.ArtifactHandler;\nimport org.apache.maven.artifact.repository.ArtifactRepository;\nimport org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;\nimport org.apache.maven.artifact.versioning.VersionRange;\nimport org.apache.maven.execution.MavenSession;\nimport org.apache.maven.plugin.AbstractMojo;\nimport org.apache.maven.plugin.MojoExecution;\nimport org.apache.maven.project.DefaultProjectBuildingRequest;\nimport org.apache.maven.project.MavenProject;\nimport org.apache.maven.project.ProjectBuildingRequest;\nimport org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver;\nimport org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException;\nimport org.apache.maven.shared.transfer.artifact.resolve.ArtifactResult;\nimport org.zeroturnaround.zip.ZipUtil;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.File;\nimport java.nio.charset.StandardCharsets;\nimport java.util.*;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\n/**\n * Auxiliary methods to work with maven entities.\n *\n * @since 2.3.0\n */\npublic final class MavenUtils {\n\n  private static final Pattern ARTIFACT_RECORD_PATTERN =\n      Pattern.compile(\"^([^:]+)::([^:]+)::([^:]*)::([^:]*)::([^:]*)::([^:]*)$\");\n\n  private MavenUtils() {\n\n  }\n\n  /**\n   * Check that execution in a test mode.\n   *\n   * @param execution maven execution object, must not be null\n   * @return true if a test mode is active, false otherwise\n   */\n  public static boolean isTestPhase(@Nonnull final MojoExecution execution) {\n    final String phase = execution.getLifecyclePhase();\n    return phase != null && (phase.equals(\"test\") || phase.equals(\"process-test-resources\") ||\n        phase.equals(\"test-compile\"));\n  }\n\n  /**\n   * Make resolve artifact project building request.\n   *\n   * @param session            maven session, must not be null\n   * @param remoteRepositories list of remote repositories, must not be null and\n   *                           can't contain null\n   * @return created request, must not be null\n   */\n  @Nonnull\n  public static ProjectBuildingRequest makeResolveArtifactProjectBuildingRequest(\n      @Nonnull final MavenSession session,\n      @Nonnull @MustNotContainNull final List<ArtifactRepository> remoteRepositories\n  ) {\n    final ProjectBuildingRequest result =\n        new DefaultProjectBuildingRequest(session.getProjectBuildingRequest());\n    result.setRemoteRepositories(remoteRepositories);\n    result.setLocalRepository(session.getLocalRepository());\n    return result;\n  }\n\n  /**\n   * Parse string containing artifact record\n   *\n   * @param record  string containing record, must not be null\n   * @param handler artifact handler for created artifact, must not be null\n   * @return new created artifact from the record, must not be null\n   * @throws InvalidVersionSpecificationException it will be thrown if version\n   *                                              format is wrong\n   * @throws IllegalArgumentException             it will be thrown if record can't be\n   *                                              recognized as artifact record\n   */\n  @Nonnull\n  public static Artifact parseArtifactRecord(\n      @Nonnull final String record,\n      @Nonnull final ArtifactHandler handler\n  ) throws InvalidVersionSpecificationException {\n    final Matcher matcher = ARTIFACT_RECORD_PATTERN.matcher(record.trim());\n    if (matcher.find()) {\n      return new DefaultArtifact(\n          matcher.group(1),\n          matcher.group(2),\n          VersionRange.createFromVersion(matcher.group(3)),\n          matcher.group(4).isEmpty() ? null : matcher.group(4),\n          matcher.group(5).isEmpty() ? null : matcher.group(5),\n          matcher.group(6).isEmpty() ? null : matcher.group(6),\n          handler);\n    }\n    throw new IllegalArgumentException(\"Can't recognize record as artifact: \" + record);\n  }\n\n  /**\n   * Make artifact record from a maven artifact\n   *\n   * @param artifact artifact to be converted into string, must not be null\n   * @return string representation of artifact, must not be null\n   * @see #parseArtifactRecord(java.lang.String,\n   * org.apache.maven.artifact.handler.ArtifactHandler)\n   */\n  @Nonnull\n  public static String makeArtifactRecord(@Nonnull final Artifact artifact) {\n    return artifact.getGroupId() +\n        \"::\" + artifact.getArtifactId() +\n        \"::\" + artifact.getVersionRange().toString() +\n        \"::\" + GetUtils.ensureNonNull(artifact.getScope(), \"compile\") +\n        \"::\" + GetUtils.ensureNonNull(artifact.getType(), \"zip\") +\n        \"::\" + GetUtils.ensureNonNull(artifact.getClassifier(), \"\");\n  }\n\n  /**\n   * Scan project dependencies to find artifacts generated by mvn golang\n   * project.\n   *\n   * @param mavenProject            maven project, must not be null\n   * @param ignoreNonResolvedArtifact   if true then missing artifact will be ignored, otherwise exception will be thrown\n   * @param includeTestDependencies flag to process dependencies marked for test\n   *                                phases\n   * @param mojo                    calling mojo, must not be null\n   * @param session                 maven session, must not be null\n   * @param execution               maven execution, must not be null\n   * @param resolver                artifact resolver, must not be null\n   * @param remoteRepositories      list of remote repositories, must not be null\n   * @return list of files found in artifacts generated by mvn golang plugin\n   * @throws ArtifactResolverException exception thrown if some artifact can't\n   *                                   be resolved\n   */\n  @Nonnull\n  @MustNotContainNull\n  public static List<Tuple<Artifact, File>> scanForMvnGoArtifacts(\n          @Nonnull final MavenProject mavenProject,\n          final boolean ignoreNonResolvedArtifact,\n          final boolean includeTestDependencies,\n          @Nonnull final AbstractMojo mojo,\n          @Nonnull final MavenSession session,\n          @Nonnull final MojoExecution execution,\n          @Nonnull final ArtifactResolver resolver,\n          @Nonnull @MustNotContainNull final List<ArtifactRepository> remoteRepositories\n  ) throws ArtifactResolverException {\n    final List<Tuple<Artifact, File>> result = new ArrayList<>();\n//    final String phase = execution.getLifecyclePhase();\n\n    final Set<String> alreadyFoundArtifactRecords = new HashSet<>();\n\n    MavenProject currentProject = mavenProject;\n    while (currentProject != null && !Thread.currentThread().isInterrupted()) {\n      final Set<Artifact> projectDependencies = currentProject.getDependencyArtifacts();\n      final List<Artifact> artifacts = new ArrayList<>(\n          projectDependencies == null ? Collections.emptySet() : projectDependencies);\n      mojo.getLog().debug(\"Detected dependency artifacts: \" + artifacts);\n\n      while (!artifacts.isEmpty() && !Thread.currentThread().isInterrupted()) {\n        final Artifact artifact = artifacts.remove(0);\n\n        if (Artifact.SCOPE_TEST.equals(artifact.getScope()) && !includeTestDependencies) {\n          continue;\n        }\n\n        if (artifact.getType().equals(AbstractGolangMojo.GOARTIFACT_PACKAGING)) {\n          final ArtifactResult artifactResult;\n          try {\n            artifactResult = resolver.resolveArtifact(\n                    makeResolveArtifactProjectBuildingRequest(session, remoteRepositories), artifact);\n          } catch (ArtifactResolverException ex) {\n            if (ignoreNonResolvedArtifact) {\n              mojo.getLog().debug(\"Can't resolve artifact: \" + artifact, ex);\n              continue;\n            } else {\n              throw ex;\n            }\n          }\n          final File zipFilePath = artifactResult.getArtifact().getFile();\n\n          mojo.getLog().debug(\n                  \"Detected MVN-GOLANG marker inside ZIP dependency: \" + artifact.getGroupId() + ':' +\n                          artifact.getArtifactId() + ':' + artifact.getVersion() + ':' +\n                          artifact.getType());\n\n          if (ZipUtil\n                  .containsEntry(zipFilePath, GolangMvnInstallMojo.MVNGOLANG_DEPENDENCIES_FILE)) {\n            final byte[] artifactFlagFile = ZipUtil\n                .unpackEntry(zipFilePath, GolangMvnInstallMojo.MVNGOLANG_DEPENDENCIES_FILE,\n                    StandardCharsets.UTF_8);\n\n            for (final String str : new String(artifactFlagFile, StandardCharsets.UTF_8)\n                .split(\"\\\\R\")) {\n              if (str.trim().isEmpty() || alreadyFoundArtifactRecords.contains(str)) {\n                continue;\n              }\n              mojo.getLog().debug(\"Adding mvn-golang dependency: \" + str);\n              alreadyFoundArtifactRecords.add(str);\n              try {\n                artifacts.add(parseArtifactRecord(str, new MvnGolangArtifactHandler()));\n              } catch (InvalidVersionSpecificationException ex) {\n                throw new ArtifactResolverException(\"Can't make artifact: \" + str, ex);\n              }\n            }\n          }\n\n          final File artifactFile = artifactResult.getArtifact().getFile();\n          mojo.getLog().debug(\"Artifact file: \" + artifactFile);\n          if (doesContainFile(result, artifactFile)) {\n            mojo.getLog().debug(\"Artifact file ignored as duplication: \" + artifactFile);\n          } else {\n            result.add(Tuple.of(artifact, artifactFile));\n          }\n        }\n      }\n      currentProject = currentProject.hasParent() ? currentProject.getParent() : null;\n    }\n\n    return result;\n  }\n\n  private static boolean doesContainFile(\n      @Nonnull @MustNotContainNull final List<Tuple<Artifact, File>> list,\n      @Nonnull final File file) {\n    boolean result = false;\n    for (final Tuple<Artifact, File> t : list) {\n      if (t.right().equals(file)) {\n        result = true;\n        break;\n      }\n    }\n    return result;\n  }\n\n  @Nullable\n  public static String findProperty(\n      @Nonnull final MavenSession session,\n      @Nonnull final MavenProject project,\n      @Nonnull final String key,\n      @Nullable final String defaultValue\n  ) {\n    final Properties properties = new Properties(project.getProperties());\n    properties.putAll(session.getSystemProperties());\n    properties.putAll(session.getUserProperties());\n    return properties.getProperty(key, defaultValue);\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/MvnGolangArtifactHandler.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport com.igormaznitsa.mvngolang.AbstractGolangMojo;\nimport org.apache.maven.artifact.handler.DefaultArtifactHandler;\n\n/**\n * Artifact handler for mvn-golang artifacts.\n *\n * @since 2.3.0\n */\npublic final class MvnGolangArtifactHandler extends DefaultArtifactHandler {\n\n  public MvnGolangArtifactHandler() {\n    super(AbstractGolangMojo.GOARTIFACT_PACKAGING);\n    this.setExtension(\"zip\");\n    this.setAddedToClasspath(false);\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/PackageList.java",
    "content": "/*\n * Copyright 2018 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport static java.util.Arrays.asList;\n\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport com.igormaznitsa.meta.common.utils.Assertions;\nimport java.io.File;\nimport java.io.IOException;\nimport java.text.ParseException;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Locale;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\n\n/**\n * Parser of package information.\n *\n * @since 2.1.9\n */\npublic final class PackageList {\n\n  private static final String DIRECTIVE_INCLUDE = \"#include\";\n  private final List<Package> packages;\n\n  public PackageList(@Nonnull @MustNotContainNull final File file, @Nonnull final String text,\n                     @Nonnull final ContentProvider contentProvider)\n      throws ParseException, IOException {\n    final List<Package> list = new ArrayList<>();\n\n    for (final String s : text.split(\"\\\\n\")) {\n      final String trimmed = s.trim();\n\n      if (!trimmed.isEmpty() && !trimmed.startsWith(\"//\")) {\n        if (trimmed.startsWith(DIRECTIVE_INCLUDE)) {\n          final String filePath = removeQuotes(\n              removeComment(trimmed.substring(DIRECTIVE_INCLUDE.length()).trim(), true));\n\n          final File includeFile = new File(file, filePath);\n\n          final String includedText = contentProvider.readContent(includeFile);\n          list.addAll(new PackageList(includeFile, includedText, contentProvider).getPackages());\n        } else {\n          list.add(new Package(trimmed));\n        }\n      }\n    }\n\n    this.packages = Collections.unmodifiableList(list);\n  }\n\n  @Nonnull\n  static String removeComment(@Nonnull final String text, final boolean checkQuotes) {\n    int pos = -1;\n    boolean quot = false;\n    boolean found = false;\n    for (int i = 0; i < text.length() && !found; i++) {\n      switch (text.charAt(i)) {\n        case '\\\"': {\n          quot = !quot;\n          pos = -1;\n        }\n        break;\n        case '/': {\n          if (!checkQuotes || !quot) {\n            if (pos < 0) {\n              pos = i;\n            } else {\n              found = true;\n            }\n          }\n        }\n        break;\n        default: {\n          pos = -1;\n        }\n        break;\n      }\n    }\n    return found ? text.substring(0, pos) : text;\n  }\n\n  @Nonnull\n  static String removeQuotes(@Nonnull final String text) {\n    String result = text;\n    if (text.length() > 1 && text.startsWith(\"\\\"\") && text.endsWith(\"\\\"\")) {\n      result = text.substring(1, text.length() - 1);\n    }\n    return result;\n  }\n\n  @Nonnull\n  @MustNotContainNull\n  public List<Package> getPackages() {\n    return this.packages;\n  }\n\n  public interface ContentProvider {\n\n    @Nonnull\n    String readContent(@Nonnull File contentFile) throws IOException;\n  }\n\n  /**\n   * Container of package information.\n   */\n  public static final class Package {\n\n    private static final String TAG_PACKAGE = \"package\";\n    private static final String TAG_BRANCH = \"branch\";\n    private static final String TAG_TAG = \"tag\";\n    private static final String TAG_REVISION = \"revision\";\n    private static final Set<String> ALLOWED_KEYS =\n        new HashSet<>(asList(TAG_BRANCH, TAG_PACKAGE, TAG_REVISION, TAG_TAG));\n    private final String pkg;\n    private final String branch;\n    private final String tag;\n    private final String revision;\n    private final Pattern PATTERN = Pattern\n        .compile(\"(?:\\\\s*([^:\\\\s]+)\\\\s*:\\\\s*([^,\\\\s]+)\\\\s*(?:,|$)?)|(.+?)\",\n            Pattern.CASE_INSENSITIVE);\n\n    public Package(@Nonnull final String pkg, @Nullable final String branch,\n                   @Nullable final String tag, @Nullable final String revision) {\n      this.pkg = Assertions.assertNotNull(pkg);\n      this.branch = branch;\n      this.revision = revision;\n      this.tag = tag;\n    }\n\n    private Package(@Nonnull String textLine) throws ParseException {\n      textLine = removeComment(textLine, false);\n\n      final Matcher matcher = PATTERN.matcher(textLine);\n\n      final Map<String, String> map = new HashMap<>();\n\n      while (matcher.find()) {\n        final String unknown = matcher.group(3);\n        if (unknown != null) {\n          throw new ParseException(textLine, matcher.start(3));\n        }\n\n        final String name = matcher.group(1).trim().toLowerCase(Locale.ENGLISH);\n        final String value = matcher.group(2).trim();\n\n        if (!ALLOWED_KEYS.contains(name)) {\n          throw new IllegalArgumentException(\"Unsupported key: \" + name);\n        }\n\n        if (map.containsKey(name)) {\n          throw new ParseException(textLine, matcher.start(1));\n        }\n\n        map.put(name, value);\n      }\n\n      if (!matcher.hitEnd()) {\n        throw new ParseException(textLine, 0);\n      }\n\n      if (!map.containsKey(TAG_PACKAGE)) {\n        throw new IllegalArgumentException(\"Can't find package name : \" + textLine);\n      }\n\n      this.pkg = map.get(TAG_PACKAGE);\n      if (this.pkg.isEmpty()) {\n        throw new IllegalArgumentException(\"Empty package name : \" + textLine);\n      }\n\n      this.branch = map.get(TAG_BRANCH);\n      this.tag = map.get(TAG_TAG);\n      this.revision = map.get(TAG_REVISION);\n    }\n\n    @Nonnull\n    public String makeString() {\n      return \"package: \" + this.pkg + \",branch: \" + this.branch + \",tag: \" + this.tag +\n          \",revision: \" + this.revision;\n    }\n\n    public boolean doesNeedCvsProcessing() {\n      return this.branch != null || this.tag != null || this.revision != null;\n    }\n\n    @Nonnull\n    public String getPackage() {\n      return this.pkg;\n    }\n\n    @Nullable\n    public String getBranch() {\n      return this.branch;\n    }\n\n    @Nullable\n    public String getTag() {\n      return this.tag;\n    }\n\n    @Nullable\n    public String getRevision() {\n      return this.revision;\n    }\n\n    @Override\n    @Nonnull\n    public String toString() {\n      return this.pkg;\n    }\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/ProxySettings.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport javax.annotation.Nonnull;\nimport org.apache.maven.settings.Proxy;\n\n/**\n * Class container for proxy server parameter.\n *\n * @since 2.1.1\n */\npublic class ProxySettings {\n\n  /**\n   * The proxy host.\n   */\n  public String host = \"127.0.0.1\";\n\n  /**\n   * The proxy protocol.\n   */\n  public String protocol = \"http\";\n\n  /**\n   * The proxy port.\n   */\n  public int port = 80;\n\n  /**\n   * The proxy user.\n   */\n  public String username;\n\n  /**\n   * The proxy password.\n   */\n  public String password = \"\";\n\n  /**\n   * The list of non-proxy hosts (delimited by |).\n   */\n  public String nonProxyHosts;\n\n  public ProxySettings() {\n  }\n\n  public ProxySettings(@Nonnull final Proxy mavenProxy) {\n    this.protocol = mavenProxy.getProtocol();\n    this.host = mavenProxy.getHost();\n    this.port = mavenProxy.getPort();\n    this.username = mavenProxy.getUsername();\n    this.password = mavenProxy.getPassword();\n    this.nonProxyHosts = mavenProxy.getNonProxyHosts();\n  }\n\n  public boolean hasCredentials() {\n    return this.username != null && this.password != null;\n  }\n\n  @Override\n  @Nonnull\n  public String toString() {\n    return this.protocol + \"://\" + this.host + \":\" + this.port;\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/StringComparatorABC.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport java.io.Serializable;\nimport java.util.Comparator;\nimport javax.annotation.Nonnull;\nimport javax.annotation.concurrent.ThreadSafe;\n\n@ThreadSafe\npublic final class StringComparatorABC implements Comparator<String>, Serializable {\n\n  private static final long serialVersionUID = -8700761616096593374L;\n\n  private static final StringComparatorABC INSTANCE = new StringComparatorABC();\n\n  private StringComparatorABC() {\n  }\n\n  @Nonnull\n  public static StringComparatorABC getInstance() {\n    return INSTANCE;\n  }\n\n  @Override\n  public int compare(@Nonnull final String a, @Nonnull final String b) {\n    return a.compareTo(b);\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/SysUtils.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport org.apache.commons.lang3.SystemUtils;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.util.Locale;\n\n/**\n * Class contains some auxiliary system related methods.\n *\n * @since 2.3.4\n */\npublic final class SysUtils {\n\n  private SysUtils() {\n  }\n\n  @Nullable\n  public static String findGoSdkOsType() {\n    final String result;\n    if (SystemUtils.IS_OS_WINDOWS) {\n      result = \"windows\";\n    } else if (SystemUtils.IS_OS_FREE_BSD) {\n      result = \"freebsd\";\n    } else if (SystemUtils.IS_OS_MAC || SystemUtils.IS_OS_MAC_OSX) {\n      result = \"darwin\";\n    } else if (SystemUtils.IS_OS_LINUX) {\n      result = \"linux\";\n    } else {\n      result = null;\n    }\n    return result;\n  }\n\n  @Nullable\n  public static String decodeGoSdkArchType(@Nonnull final String osArchProperty) {\n    final String arch = osArchProperty.toLowerCase(Locale.ENGLISH);\n    if (arch.contains(\"ppc64le\")) {\n      return \"ppc64le\";\n    } else if (arch.contains(\"armv6l\")) {\n      return \"armv6l\";\n    } else if (arch.contains(\"arm64\") || arch.contains(\"aarch64\")) {\n      return \"arm64\";\n    } else if (arch.contains(\"s390\")) {\n      return \"s390x\";\n    }\n    if (arch.matches(\"^(x8632|x86|i[3-6]86|ia32|x32)$\")) {\n      return \"386\";\n    } else if (arch.contains(\"em64t\")\n        || arch.contains(\"x8664\")\n        || arch.contains(\"ia32e\")\n        || arch.contains(\"x64\")\n        || arch.contains(\"amd64\")\n        || arch.contains(\"x86_64\")) {\n      return \"amd64\";\n    }\n    return null;\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/Tuple.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport com.igormaznitsa.meta.common.utils.Assertions;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\n\npublic class Tuple<A, B> {\n\n  private final A left;\n  private final B right;\n\n  private Tuple(@Nonnull final A left, @Nonnull final B right) {\n    this.left = Assertions.assertNotNull(left);\n    this.right = Assertions.assertNotNull(right);\n  }\n\n  @Nonnull\n  public static <A, B> Tuple<A, B> of(@Nonnull A left, @Nonnull B right) {\n    return new Tuple<>(left, right);\n  }\n\n  @Override\n  public boolean equals(@Nullable final Object obj) {\n    if (obj == this) {\n      return true;\n    }\n    if (obj == null) {\n      return false;\n    }\n    if (obj instanceof Tuple) {\n      final Tuple<?, ?> that = (Tuple<?, ?>) obj;\n      return this.left.equals(that.left) && this.right.equals(that.right);\n    }\n    return false;\n  }\n\n  @Override\n  @Nonnull\n  public String toString() {\n    return \"Tuple(\" + this.left + \" ; \" + this.right + ')';\n  }\n\n  @Override\n  public int hashCode() {\n    return this.left.hashCode() ^ this.right.hashCode();\n  }\n\n  @Nonnull\n  public A left() {\n    return this.left;\n  }\n\n  @Nonnull\n  public B right() {\n    return this.right;\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/UnpackUtils.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport static com.igormaznitsa.mvngolang.utils.IOUtils.closeSilently;\n\n\nimport java.io.BufferedInputStream;\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.Enumeration;\nimport java.util.Locale;\nimport java.util.zip.GZIPInputStream;\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport org.apache.commons.compress.archivers.ArchiveEntry;\nimport org.apache.commons.compress.archivers.ArchiveException;\nimport org.apache.commons.compress.archivers.ArchiveInputStream;\nimport org.apache.commons.compress.archivers.ArchiveStreamFactory;\nimport org.apache.commons.compress.archivers.tar.TarArchiveInputStream;\nimport org.apache.commons.compress.archivers.zip.ZipArchiveEntry;\nimport org.apache.commons.compress.archivers.zip.ZipFile;\nimport org.apache.commons.io.FilenameUtils;\nimport org.apache.commons.io.IOUtils;\nimport org.apache.maven.plugin.logging.Log;\n\npublic final class UnpackUtils {\n\n  private static final ArchiveStreamFactory ARCHIVE_STREAM_FACTORY = new ArchiveStreamFactory();\n\n  private UnpackUtils() {\n  }\n\n  public static int unpackFileToFolder(@Nonnull final Log logger, @Nullable final String folder,\n                                       @Nonnull final File archiveFile,\n                                       @Nonnull final File destinationFolder,\n                                       final boolean tryMakeAllExecutable) throws IOException {\n    final String normalizedName = archiveFile.getName().toLowerCase(Locale.ENGLISH);\n\n    final ArchEntryGetter entryGetter;\n\n    boolean modeZipFile = false;\n\n    final ZipFile theZipFile;\n    final ArchiveInputStream archInputStream;\n    if (normalizedName.endsWith(\".zip\")) {\n      logger.debug(\"Detected ZIP archive\");\n\n      modeZipFile = true;\n\n      theZipFile = new ZipFile(archiveFile);\n      archInputStream = null;\n      entryGetter = new ArchEntryGetter() {\n        private final Enumeration<ZipArchiveEntry> iterator = theZipFile.getEntries();\n\n        @Override\n        @Nullable\n        public ArchiveEntry getNextEntry() throws IOException {\n          ArchiveEntry result = null;\n          if (this.iterator.hasMoreElements()) {\n            result = this.iterator.nextElement();\n          }\n          return result;\n        }\n      };\n    } else {\n      theZipFile = null;\n      final InputStream in = new BufferedInputStream(new FileInputStream(archiveFile));\n      try {\n        if (normalizedName.endsWith(\".tar.gz\")) {\n          logger.debug(\"Detected TAR.GZ archive\");\n          archInputStream = new TarArchiveInputStream(new GZIPInputStream(in));\n          entryGetter = ((TarArchiveInputStream) archInputStream)::getNextTarEntry;\n        } else {\n          logger.debug(\"Detected OTHER archive\");\n          archInputStream = ARCHIVE_STREAM_FACTORY.createArchiveInputStream(in);\n          logger.debug(\"Created archive stream : \" + archInputStream.getClass().getName());\n          entryGetter = archInputStream::getNextEntry;\n        }\n\n      } catch (ArchiveException ex) {\n        closeSilently(in);\n        throw new IOException(\"Can't recognize or read archive file : \" + archiveFile, ex);\n      } catch (CantReadArchiveEntryException ex) {\n        closeSilently(in);\n        throw new IOException(\"Can't read entry from archive file : \" + archiveFile, ex);\n      }\n    }\n\n    try {\n\n      final String normalizedFolder =\n          folder == null ? null : FilenameUtils.normalize(folder, true) + '/';\n\n      int unpackedFilesCounter = 0;\n      while (true) {\n        final ArchiveEntry entry = entryGetter.getNextEntry();\n        if (entry == null) {\n          break;\n        }\n        final String normalizedPath = FilenameUtils.normalize(entry.getName(), true);\n\n        logger.debug(\"Detected archive entry : \" + normalizedPath);\n\n        if (normalizedFolder == null || normalizedPath.startsWith(normalizedFolder)) {\n          final File targetFile = new File(destinationFolder,\n              normalizedFolder == null ? normalizedPath :\n                  normalizedPath.substring(normalizedFolder.length()));\n          if (entry.isDirectory()) {\n            logger.debug(\"Folder : \" + normalizedPath);\n            if (!targetFile.exists() && !targetFile.mkdirs()) {\n              throw new IOException(\"Can't create folder \" + targetFile);\n            }\n          } else {\n            final File parent = targetFile.getParentFile();\n\n            if (parent != null && !parent.isDirectory() && !parent.mkdirs()) {\n              throw new IOException(\"Can't create folder : \" + parent);\n            }\n\n            try (final FileOutputStream fos = new FileOutputStream(targetFile)) {\n              if (modeZipFile) {\n                logger.debug(\"Unpacking ZIP entry : \" + normalizedPath);\n\n                final InputStream zipEntryInStream =\n                    theZipFile.getInputStream((ZipArchiveEntry) entry);\n                try {\n                  if (IOUtils.copy(zipEntryInStream, fos) != entry.getSize()) {\n                    throw new IOException(\n                        \"Can't unpack file, illegal unpacked length : \" + entry.getName());\n                  }\n                } finally {\n                  closeSilently(zipEntryInStream);\n                }\n              } else {\n                logger.debug(\"Unpacking archive entry : \" + normalizedPath);\n\n                if (!archInputStream.canReadEntryData(entry)) {\n                  throw new IOException(\"Can't read archive entry data : \" + normalizedPath);\n                }\n                if (IOUtils.copy(archInputStream, fos) != entry.getSize()) {\n                  throw new IOException(\n                      \"Can't unpack file, illegal unpacked length : \" + entry.getName());\n                }\n              }\n            }\n\n            if (tryMakeAllExecutable) {\n              try {\n                if (!targetFile.setExecutable(true, true)) {\n                  logger.debug(\"Can't make file executable : \" + targetFile);\n                }\n              } catch (SecurityException ex) {\n                throw new IOException(\n                    \"Can't make file executable for security reasons : \" + targetFile, ex);\n              }\n            }\n            unpackedFilesCounter++;\n          }\n        } else {\n          logger.debug(\"Archive entry \" + normalizedPath + \" ignored\");\n        }\n      }\n      return unpackedFilesCounter;\n    } finally {\n      closeSilently(theZipFile);\n      closeSilently(archInputStream);\n    }\n  }\n\n  private interface ArchEntryGetter {\n\n    @Nullable\n    ArchiveEntry getNextEntry() throws IOException;\n  }\n\n  public static class CantReadArchiveEntryException extends RuntimeException {\n\n    private static final long serialVersionUID = 1989670574345144082L;\n\n    public CantReadArchiveEntryException(@Nullable final Throwable cause) {\n      super(\"Can't read archive entry for exception\", cause);\n    }\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/WildCardMatcher.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport java.util.Locale;\nimport java.util.regex.Pattern;\nimport javax.annotation.Nonnull;\n\npublic final class WildCardMatcher {\n\n  private final Pattern pattern;\n  private final String addressPattern;\n\n  public WildCardMatcher(@Nonnull final String txt) {\n    this.addressPattern = txt.trim();\n    final StringBuilder builder = new StringBuilder();\n    for (final char c : this.addressPattern.toCharArray()) {\n      switch (c) {\n        case '*':\n          builder.append(\".*\");\n          break;\n        case '?':\n          builder.append('.');\n          break;\n        default: {\n          final String code = Integer.toHexString(c).toUpperCase(Locale.ENGLISH);\n          builder.append(\"\\\\u\").append(\"0000\", 0, 4 - code.length()).append(code);\n        }\n        break;\n      }\n    }\n    this.pattern = Pattern.compile(builder.toString());\n  }\n\n  public boolean match(@Nonnull final String txt) {\n    return this.pattern.matcher(txt).matches();\n  }\n\n  @Nonnull\n  @Override\n  public String toString() {\n    return this.addressPattern;\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/main/java/com/igormaznitsa/mvngolang/utils/XGoogHashHeader.java",
    "content": "/*\n * Copyright 2018 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport com.igormaznitsa.meta.annotation.MustNotContainNull;\nimport org.apache.commons.codec.binary.Base64;\nimport org.apache.commons.codec.binary.Hex;\nimport org.apache.commons.codec.digest.DigestUtils;\nimport org.apache.http.Header;\nimport org.apache.http.HeaderElement;\nimport org.apache.http.ParseException;\nimport org.apache.maven.plugin.logging.Log;\n\nimport javax.annotation.Nonnull;\nimport javax.annotation.Nullable;\nimport java.io.*;\n\npublic class XGoogHashHeader {\n\n  private final boolean valid;\n  private final String crc32c;\n  private final String md5;\n  private final String unknownType;\n  private final String unknownValue;\n\n  public XGoogHashHeader(@Nonnull @MustNotContainNull final Header[] headers) {\n    String md5value = null;\n    String crc32value = null;\n    String unknownTypeValue = null;\n    String unknownValueValue = null;\n\n    boolean valid = true;\n\n    try {\n      for (final Header header : headers) {\n        for (final HeaderElement e : header.getElements()) {\n          final String name = e.getName();\n          final String value = Hex.encodeHexString(Base64.decodeBase64(e.getValue()));\n          if (name.equalsIgnoreCase(\"md5\")) {\n            md5value = value;\n          } else if (name.equalsIgnoreCase(\"crc32c\")) {\n            crc32value = value;\n          } else {\n            unknownTypeValue = name;\n            unknownValueValue = value;\n          }\n        }\n      }\n    } catch (ParseException ex) {\n      valid = false;\n    }\n    this.md5 = md5value;\n    this.crc32c = crc32value;\n    this.unknownType = unknownTypeValue;\n    this.unknownValue = unknownValueValue;\n    this.valid = valid;\n  }\n\n  public boolean hasData() {\n    return this.hasMd5() || this.hasCrc32c();\n  }\n\n  public boolean hasMd5() {\n    return this.md5 != null;\n  }\n\n  @Nullable\n  public String getMd5() {\n    return this.md5;\n  }\n\n  public boolean hasCrc32c() {\n    return this.crc32c != null;\n  }\n\n  @Nullable\n  public String getCrc32c() {\n    return this.crc32c;\n  }\n\n  public boolean isFileOk(@Nonnull final Log log, @Nonnull final File file) throws IOException {\n    if (this.isValid()) {\n      if (this.hasMd5()) {\n        try (final InputStream in = new FileInputStream(file)) {\n          final String calculated = DigestUtils.md5Hex(in);\n          log.debug(\"Check MD5 hash (reference \" + this.md5 + \"): \" + calculated);\n          return this.md5.equalsIgnoreCase(calculated);\n        }\n      } else if (this.hasCrc32c()) {\n        try (final InputStream in = new BufferedInputStream(new FileInputStream(file), 16384)) {\n          final Crc32c crc = new Crc32c();\n          crc.update(in);\n          log.debug(\"Check CRC32C hash (reference \" + this.crc32c + \"): \" + crc);\n          return this.crc32c.equalsIgnoreCase(crc.toString());\n        }\n      }\n    }\n    throw new IOException(\"Not valid or doesn't have data\");\n  }\n\n  @Nonnull\n  @Override\n  public String toString() {\n    final StringBuilder result = new StringBuilder();\n    result.append(\"XGoogHashHeader(valid=\").append(this.valid)\n        .append(\",md5=\").append(this.md5)\n        .append(\",crc32c=\").append(this.crc32c);\n    if (this.unknownType != null) {\n      result.append(',').append(this.unknownType).append('=').append(this.unknownValue);\n    }\n    result.append(')');\n    return result.toString();\n  }\n\n  public boolean isValid() {\n    return this.valid;\n  }\n\n  private static class Crc32c {\n\n    private static final long[] CRC_TABLE = {\n        0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4,\n        0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb,\n        0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b,\n        0x4d43cfd0, 0xbf284cd3, 0xac78bf27, 0x5e133c24,\n        0x105ec76f, 0xe235446c, 0xf165b798, 0x030e349b,\n        0xd7c45070, 0x25afd373, 0x36ff2087, 0xc494a384,\n        0x9a879fa0, 0x68ec1ca3, 0x7bbcef57, 0x89d76c54,\n        0x5d1d08bf, 0xaf768bbc, 0xbc267848, 0x4e4dfb4b,\n        0x20bd8ede, 0xd2d60ddd, 0xc186fe29, 0x33ed7d2a,\n        0xe72719c1, 0x154c9ac2, 0x061c6936, 0xf477ea35,\n        0xaa64d611, 0x580f5512, 0x4b5fa6e6, 0xb93425e5,\n        0x6dfe410e, 0x9f95c20d, 0x8cc531f9, 0x7eaeb2fa,\n        0x30e349b1, 0xc288cab2, 0xd1d83946, 0x23b3ba45,\n        0xf779deae, 0x05125dad, 0x1642ae59, 0xe4292d5a,\n        0xba3a117e, 0x4851927d, 0x5b016189, 0xa96ae28a,\n        0x7da08661, 0x8fcb0562, 0x9c9bf696, 0x6ef07595,\n        0x417b1dbc, 0xb3109ebf, 0xa0406d4b, 0x522bee48,\n        0x86e18aa3, 0x748a09a0, 0x67dafa54, 0x95b17957,\n        0xcba24573, 0x39c9c670, 0x2a993584, 0xd8f2b687,\n        0x0c38d26c, 0xfe53516f, 0xed03a29b, 0x1f682198,\n        0x5125dad3, 0xa34e59d0, 0xb01eaa24, 0x42752927,\n        0x96bf4dcc, 0x64d4cecf, 0x77843d3b, 0x85efbe38,\n        0xdbfc821c, 0x2997011f, 0x3ac7f2eb, 0xc8ac71e8,\n        0x1c661503, 0xee0d9600, 0xfd5d65f4, 0x0f36e6f7,\n        0x61c69362, 0x93ad1061, 0x80fde395, 0x72966096,\n        0xa65c047d, 0x5437877e, 0x4767748a, 0xb50cf789,\n        0xeb1fcbad, 0x197448ae, 0x0a24bb5a, 0xf84f3859,\n        0x2c855cb2, 0xdeeedfb1, 0xcdbe2c45, 0x3fd5af46,\n        0x7198540d, 0x83f3d70e, 0x90a324fa, 0x62c8a7f9,\n        0xb602c312, 0x44694011, 0x5739b3e5, 0xa55230e6,\n        0xfb410cc2, 0x092a8fc1, 0x1a7a7c35, 0xe811ff36,\n        0x3cdb9bdd, 0xceb018de, 0xdde0eb2a, 0x2f8b6829,\n        0x82f63b78, 0x709db87b, 0x63cd4b8f, 0x91a6c88c,\n        0x456cac67, 0xb7072f64, 0xa457dc90, 0x563c5f93,\n        0x082f63b7, 0xfa44e0b4, 0xe9141340, 0x1b7f9043,\n        0xcfb5f4a8, 0x3dde77ab, 0x2e8e845f, 0xdce5075c,\n        0x92a8fc17, 0x60c37f14, 0x73938ce0, 0x81f80fe3,\n        0x55326b08, 0xa759e80b, 0xb4091bff, 0x466298fc,\n        0x1871a4d8, 0xea1a27db, 0xf94ad42f, 0x0b21572c,\n        0xdfeb33c7, 0x2d80b0c4, 0x3ed04330, 0xccbbc033,\n        0xa24bb5a6, 0x502036a5, 0x4370c551, 0xb11b4652,\n        0x65d122b9, 0x97baa1ba, 0x84ea524e, 0x7681d14d,\n        0x2892ed69, 0xdaf96e6a, 0xc9a99d9e, 0x3bc21e9d,\n        0xef087a76, 0x1d63f975, 0x0e330a81, 0xfc588982,\n        0xb21572c9, 0x407ef1ca, 0x532e023e, 0xa145813d,\n        0x758fe5d6, 0x87e466d5, 0x94b49521, 0x66df1622,\n        0x38cc2a06, 0xcaa7a905, 0xd9f75af1, 0x2b9cd9f2,\n        0xff56bd19, 0x0d3d3e1a, 0x1e6dcdee, 0xec064eed,\n        0xc38d26c4, 0x31e6a5c7, 0x22b65633, 0xd0ddd530,\n        0x0417b1db, 0xf67c32d8, 0xe52cc12c, 0x1747422f,\n        0x49547e0b, 0xbb3ffd08, 0xa86f0efc, 0x5a048dff,\n        0x8ecee914, 0x7ca56a17, 0x6ff599e3, 0x9d9e1ae0,\n        0xd3d3e1ab, 0x21b862a8, 0x32e8915c, 0xc083125f,\n        0x144976b4, 0xe622f5b7, 0xf5720643, 0x07198540,\n        0x590ab964, 0xab613a67, 0xb831c993, 0x4a5a4a90,\n        0x9e902e7b, 0x6cfbad78, 0x7fab5e8c, 0x8dc0dd8f,\n        0xe330a81a, 0x115b2b19, 0x020bd8ed, 0xf0605bee,\n        0x24aa3f05, 0xd6c1bc06, 0xc5914ff2, 0x37faccf1,\n        0x69e9f0d5, 0x9b8273d6, 0x88d28022, 0x7ab90321,\n        0xae7367ca, 0x5c18e4c9, 0x4f48173d, 0xbd23943e,\n        0xf36e6f75, 0x0105ec76, 0x12551f82, 0xe03e9c81,\n        0x34f4f86a, 0xc69f7b69, 0xd5cf889d, 0x27a40b9e,\n        0x79b737ba, 0x8bdcb4b9, 0x988c474d, 0x6ae7c44e,\n        0xbe2da0a5, 0x4c4623a6, 0x5f16d052, 0xad7d5351\n    };\n\n    private static final long LONG_MASK = 0xffffffffL;\n    private static final long BYTE_MASK = 0xff;\n\n    private long crc;\n\n    public Crc32c() {\n      this.crc = 0;\n    }\n\n    public void reset() {\n      this.crc = 0;\n    }\n\n    public long getCrc() {\n      return this.crc;\n    }\n\n    public long update(@Nonnull final InputStream in) throws IOException {\n      while (!Thread.currentThread().isInterrupted()) {\n        final int next = in.read();\n        if (next < 0) {\n          break;\n        }\n        update(next);\n      }\n      return this.crc;\n    }\n\n    public long update(int b) {\n      long newCrc = this.crc ^ LONG_MASK;\n      newCrc = updateByte((byte) b, newCrc);\n      this.crc = newCrc ^ LONG_MASK;\n      return this.crc;\n    }\n\n    private long updateByte(byte newByte, long crc) {\n      byte b = (byte) (newByte & BYTE_MASK);\n      int index = (int) ((crc ^ b) & BYTE_MASK);\n      return (CRC_TABLE[index] ^ (crc >> 8)) & LONG_MASK;\n    }\n\n    @Nonnull\n    @Override\n    public String toString() {\n      final byte[] data = new byte[4];\n      data[0] = (byte) (this.crc >>> 24);\n      data[1] = (byte) (this.crc >>> 16);\n      data[2] = (byte) (this.crc >>> 8);\n      data[3] = (byte) this.crc;\n      return Hex.encodeHexString(data);\n    }\n  }\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/java/com/igormaznitsa/mvngolang/GolangBuildMojoTest.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport static java.util.Arrays.asList;\nimport static java.util.Arrays.copyOfRange;\nimport static org.hamcrest.CoreMatchers.endsWith;\nimport static org.hamcrest.CoreMatchers.hasItem;\nimport static org.hamcrest.CoreMatchers.not;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertTrue;\n\n\nimport org.junit.Test;\n\npublic class GolangBuildMojoTest {\n\n  private GolangBuildMojo makeBuildMojo() {\n    final GolangBuildMojo buildMojo = new GolangBuildMojo();\n    buildMojo.setPackages(new String[] {\"some.pack1\", \"some.pack2\"});\n    buildMojo.setResultFolder(\"some/folder\");\n    buildMojo.setResultName(\"targetName\");\n    return buildMojo;\n  }\n\n  @Test\n  public void testPackageTest_Multiple() throws Exception {\n    final GolangBuildMojo buildMojo = makeBuildMojo();\n    assertTrue(buildMojo.getPackages().length > 1);\n    assertThat(asList(buildMojo.getCommandFlags()), not(hasItem(\"-o\")));\n    assertThat(asList(buildMojo.getCommandFlags()), not(hasItem(endsWith(\"targetName\"))));\n  }\n\n  @Test\n  public void testPackageTest_Single() throws Exception {\n    final GolangBuildMojo buildMojo = makeBuildMojo();\n    buildMojo.setPackages(copyOfRange(buildMojo.getPackages(), 0, 1));\n    assertEquals(1, buildMojo.getPackages().length);\n    assertThat(asList(buildMojo.getCommandFlags()), hasItem(\"-o\"));\n    assertThat(asList(buildMojo.getCommandFlags()), hasItem(endsWith(\"targetName\")));\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/java/com/igormaznitsa/mvngolang/GolangModMojoCfgTest.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang;\n\nimport com.igormaznitsa.mvngolang.utils.IOUtils;\nimport com.igormaznitsa.mvngolang.utils.ProxySettings;\nimport org.apache.maven.execution.DefaultMavenExecutionRequest;\nimport org.apache.maven.execution.MavenExecutionRequest;\nimport org.apache.maven.plugin.testing.AbstractMojoTestCase;\nimport org.apache.maven.project.MavenProject;\nimport org.apache.maven.project.ProjectBuilder;\nimport org.apache.maven.project.ProjectBuildingRequest;\nimport org.junit.Test;\n\nimport java.io.File;\n\nimport static org.junit.Assert.assertArrayEquals;\n\npublic class GolangModMojoCfgTest extends AbstractMojoTestCase {\n\n  private static void assertEqualsPath(final String etalon, final String toCheck) {\n    assertFalse(\"Must contain single path : \" + etalon, etalon.contains(File.pathSeparator));\n    assertFalse(\"Must contain single path : \" + toCheck, etalon.contains(File.pathSeparator));\n\n    String normalizedEtalon = etalon.replace('\\\\', '/');\n    String normalizedToCheck = toCheck.replace('\\\\', '/');\n\n    normalizedEtalon = new File(normalizedEtalon).getAbsolutePath();\n    normalizedToCheck = new File(normalizedToCheck).getAbsolutePath();\n\n    assertEquals(\"Wrong path : \" + toCheck + \" instead of \" + etalon, normalizedEtalon,\n        normalizedToCheck);\n  }\n\n  private <T> T findMojo(final Class<T> klazz, final String pomName, final String goal)\n      throws Exception {\n    final File pomFile = new File(GolangModMojoCfgTest.class.getResource(pomName).toURI());\n    final MavenExecutionRequest executionRequest = new DefaultMavenExecutionRequest();\n    final ProjectBuildingRequest buildingRequest = executionRequest.getProjectBuildingRequest();\n    buildingRequest.setSystemProperties(System.getProperties());\n    final ProjectBuilder projectBuilder = this.lookup(ProjectBuilder.class);\n    final MavenProject project = projectBuilder.build(pomFile, buildingRequest).getProject();\n    return klazz.cast(this.lookupConfiguredMojo(project, goal));\n  }\n\n  @Override\n  protected void setUp() throws Exception {\n    super.setUp();\n  }\n\n  @Override\n  protected void tearDown() throws Exception {\n    super.tearDown();\n  }\n\n  @Test\n  public void testGolangCustomMojoConfiguration() throws Exception {\n    final GolangCustomMojo customMojo =\n        findMojo(GolangCustomMojo.class, \"mojoCustom.xml\", \"custom\");\n    assertFalse(customMojo.isModuleMode());\n    assertTrue(customMojo.getGoCache().contains(\"${file.separator}\"));\n    assertTrue(customMojo.getDependencyTempFolder().endsWith(\".__deps__\"));\n    assertTrue(customMojo.isScanDependencies());\n    assertTrue(customMojo.isIncludeTestDependencies());\n    assertTrue(customMojo.isFilterEnvPath());\n    assertEquals(60000, customMojo.getConnectionTimeout());\n    assertFalse(customMojo.isCheckSdkHash());\n    assertFalse(customMojo.isDisableSslCheck());\n    assertFalse(customMojo.isUseMavenProxy());\n    assertFalse(customMojo.getSupposeSdkArchiveFileName());\n    assertFalse(customMojo.isSkip());\n    assertNull(customMojo.getProxy());\n    assertNull(customMojo.getTargetArch());\n    assertNull(customMojo.getTargetOS());\n    assertFalse(customMojo.isEnforceGoPathToEnd());\n    assertNull(customMojo.getTargetArm());\n    assertFalse(customMojo.isUseEnvVars());\n    assertEquals(\"someCustomCommand\", customMojo.getGoCommand());\n    assertFalse(customMojo.isVerbose());\n    assertTrue(customMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", customMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", customMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(customMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"one_pack\", \"two_pack\"}, customMojo.getTailArguments());\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, customMojo.getBuildFlags());\n    assertNull(customMojo.getErrLogFile());\n    assertNull(customMojo.getOutLogFile());\n    assertNotNull(customMojo.getReportsFolder());\n    assertFalse(customMojo.isIgnoreErrorExitCode());\n    assertEquals(\"387\", customMojo.getTarget386());\n  }\n\n  @Test\n  public void testGolangJfrogCliMojoConfiguration() throws Exception {\n    final GolangJfrogCliMojo jfrogCliMojo =\n        findMojo(GolangJfrogCliMojo.class, \"mojoJFrogCli.xml\", \"jfrog-cli\");\n    assertEquals(60000, jfrogCliMojo.getConnectionTimeout());\n    assertEquals(jfrogCliMojo.getGoCache(), \"some/path/cache\");\n    assertFalse(jfrogCliMojo.isCheckSdkHash());\n    assertFalse(jfrogCliMojo.isDisableSslCheck());\n    assertFalse(jfrogCliMojo.isUseMavenProxy());\n    assertFalse(jfrogCliMojo.getSupposeSdkArchiveFileName());\n    assertFalse(jfrogCliMojo.isSkip());\n    assertNull(jfrogCliMojo.getProxy());\n    assertNull(jfrogCliMojo.getTargetArch());\n    assertNull(jfrogCliMojo.getTargetOS());\n    assertFalse(jfrogCliMojo.isEnforceGoPathToEnd());\n    assertNull(jfrogCliMojo.getTargetArm());\n    assertFalse(jfrogCliMojo.isUseEnvVars());\n    assertFalse(jfrogCliMojo.isVerbose());\n    assertTrue(jfrogCliMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", jfrogCliMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", jfrogCliMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(jfrogCliMojo.findGoPath(false)));\n    assertNull(jfrogCliMojo.getErrLogFile());\n    assertNull(jfrogCliMojo.getOutLogFile());\n    assertNotNull(jfrogCliMojo.getReportsFolder());\n    assertFalse(jfrogCliMojo.isIgnoreErrorExitCode());\n    assertEquals(\"387\", jfrogCliMojo.getTarget386());\n\n    assertEqualsPath(\"some/jfrog\", jfrogCliMojo.getCliPath());\n    assertEquals(\"mc\", jfrogCliMojo.getTarget());\n    assertEquals(\"s\", jfrogCliMojo.getCommand());\n    assertArrayEquals(\n        new String[] {\"add\", \"ARTIFACTORY\", \"my-arti\", \"--service-url=http://10.100.1.127\",\n            \"--service-user=admin\", \"--service-password=password\"},\n        jfrogCliMojo.getArguments().toArray());\n  }\n\n  @Test\n  public void testGolangCleanMojoConfiguration() throws Exception {\n    final GolangCleanMojo cleanMojo = findMojo(GolangCleanMojo.class, \"mojoClean.xml\", \"clean\");\n    assertNull(cleanMojo.getWorkingDir());\n    assertTrue(cleanMojo.isModuleMode());\n    assertEquals(60000, cleanMojo.getConnectionTimeout());\n    assertTrue(cleanMojo.isCheckSdkHash());\n    assertTrue(cleanMojo.isUseMavenProxy());\n    assertFalse(cleanMojo.isSkip());\n    assertNull(cleanMojo.getProxy());\n    assertNull(cleanMojo.getTargetArch());\n    assertNull(cleanMojo.getTargetOS());\n    assertNull(cleanMojo.getTargetArm());\n    assertFalse(cleanMojo.isUseEnvVars());\n    assertEquals(\"clean\", cleanMojo.getGoCommand());\n    assertFalse(cleanMojo.isVerbose());\n    assertTrue(cleanMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", cleanMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", cleanMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(cleanMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"one_pack\", \"two_pack\"}, cleanMojo.getTailArguments());\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, cleanMojo.getBuildFlags());\n    assertNull(cleanMojo.getTarget386());\n  }\n\n  @Test\n  public void testGolangMvnInstallMojoConfiguration() throws Exception {\n    final GolangMvnInstallMojo mvnInstallMojo =\n        findMojo(GolangMvnInstallMojo.class, \"mojoMvnInstall.xml\", \"mvninstall\");\n    assertEquals(3, mvnInstallMojo.getCompression());\n  }\n\n  @Test\n  public void testGolangFixMojoConfiguration() throws Exception {\n    final GolangFixMojo fixMojo = findMojo(GolangFixMojo.class, \"mojoFix.xml\", \"fix\");\n    assertEquals(60000, fixMojo.getConnectionTimeout());\n    assertTrue(fixMojo.isDisableSslCheck());\n    assertTrue(fixMojo.isUseMavenProxy());\n    assertFalse(fixMojo.isSkip());\n    assertNull(fixMojo.getProxy());\n    assertFalse(fixMojo.isUseEnvVars());\n    assertNull(fixMojo.getTargetArm());\n    assertEquals(\"fix\", fixMojo.getGoCommand());\n    assertFalse(fixMojo.isVerbose());\n    assertTrue(fixMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", fixMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", fixMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(fixMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"one_pack\", \"two_pack\"}, fixMojo.getTailArguments());\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, fixMojo.getBuildFlags());\n  }\n\n  @Test\n  public void testGolangFmtMojoConfiguration() throws Exception {\n    final GolangFmtMojo fmtMojo = findMojo(GolangFmtMojo.class, \"mojoFmt.xml\", \"fmt\");\n    assertEquals(60000, fmtMojo.getConnectionTimeout());\n    assertTrue(fmtMojo.isUseMavenProxy());\n    assertFalse(fmtMojo.isSkip());\n    assertNull(fmtMojo.getProxy());\n    assertFalse(fmtMojo.isUseEnvVars());\n    assertNull(fmtMojo.getTargetArm());\n    assertEquals(\"fmt\", fmtMojo.getGoCommand());\n    assertFalse(fmtMojo.isVerbose());\n    assertTrue(fmtMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", fmtMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", fmtMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(fmtMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"one_pack\", \"two_pack\"}, fmtMojo.getTailArguments());\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, fmtMojo.getBuildFlags());\n  }\n\n  @Test\n  public void testGolangGenerateMojoConfiguration() throws Exception {\n    final GolangGenerateMojo genMojo =\n        findMojo(GolangGenerateMojo.class, \"mojoGenerate.xml\", \"generate\");\n    assertEquals(60000, genMojo.getConnectionTimeout());\n    assertTrue(genMojo.isUseMavenProxy());\n    assertFalse(genMojo.isSkip());\n    assertNull(genMojo.getProxy());\n    assertFalse(genMojo.isUseEnvVars());\n    assertNull(genMojo.getTargetArm());\n    assertEquals(\"generate\", genMojo.getGoCommand());\n    assertFalse(genMojo.isVerbose());\n    assertTrue(genMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", genMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", genMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(genMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"one_pack\", \"two_pack\"}, genMojo.getTailArguments());\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, genMojo.getBuildFlags());\n  }\n\n  @Test\n  public void testGolangInstallMojoConfiguration() throws Exception {\n    final GolangInstallMojo instMojo =\n        findMojo(GolangInstallMojo.class, \"mojoInstall.xml\", \"install\");\n    assertEquals(60000, instMojo.getConnectionTimeout());\n    assertTrue(instMojo.isUseMavenProxy());\n    assertFalse(instMojo.isSkip());\n    assertNull(instMojo.getProxy());\n    assertFalse(instMojo.isUseEnvVars());\n    assertNull(instMojo.getTargetArm());\n    assertEquals(\"install\", instMojo.getGoCommand());\n    assertFalse(instMojo.isVerbose());\n    assertTrue(instMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", instMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", instMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(instMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"one_pack\", \"two_pack\"}, instMojo.getTailArguments());\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, instMojo.getBuildFlags());\n  }\n\n  @Test\n  public void testGolangVetMojoConfiguration() throws Exception {\n    final GolangVetMojo vetMojo = findMojo(GolangVetMojo.class, \"mojoVet.xml\", \"vet\");\n    assertEquals(60000, vetMojo.getConnectionTimeout());\n    assertTrue(vetMojo.isUseMavenProxy());\n    assertFalse(vetMojo.isSkip());\n    assertNull(vetMojo.getProxy());\n    assertFalse(vetMojo.isUseEnvVars());\n    assertNull(vetMojo.getTargetArm());\n    assertEquals(\"vet\", vetMojo.getGoCommand());\n    assertFalse(vetMojo.isVerbose());\n    assertTrue(vetMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", vetMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", vetMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(vetMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"one_pack\", \"two_pack\"}, vetMojo.getTailArguments());\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, vetMojo.getBuildFlags());\n  }\n\n  @Test\n  public void testGolangTestMojoConfiguration() throws Exception {\n    final GolangTestMojo testMojo = findMojo(GolangTestMojo.class, \"mojoTest.xml\", \"test\");\n    assertEquals(\"some/someTempFolder\", testMojo.getDependencyTempFolder());\n    assertFalse(testMojo.isScanDependencies());\n    assertFalse(testMojo.isIncludeTestDependencies());\n    assertEquals(60000, testMojo.getConnectionTimeout());\n    assertTrue(testMojo.isUseMavenProxy());\n    assertNull(testMojo.getProxy());\n    assertFalse(testMojo.isSkip());\n    assertFalse(testMojo.isUseEnvVars());\n    assertNull(testMojo.getTargetArm());\n    assertEquals(\"test\", testMojo.getGoCommand());\n    assertFalse(testMojo.isVerbose());\n    assertTrue(testMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", testMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", testMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(testMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"one_pack\", \"two_pack\"}, testMojo.getTailArguments());\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, testMojo.getBuildFlags());\n    assertArrayEquals(new String[] {\"binFlag1\", \"binFlag2\"}, testMojo.getTestFlags());\n    assertTrue(testMojo.isIgnoreErrorExitCode());\n  }\n\n  @Test\n  public void testGolangToolMojoConfiguration() throws Exception {\n    final GolangToolMojo toolMojo = findMojo(GolangToolMojo.class, \"mojoTool.xml\", \"tool\");\n    assertEquals(60000, toolMojo.getConnectionTimeout());\n    assertTrue(toolMojo.isUseMavenProxy());\n    assertNull(toolMojo.getProxy());\n    assertFalse(toolMojo.isSkip());\n    assertFalse(toolMojo.isUseEnvVars());\n    assertNull(toolMojo.getTargetArm());\n    assertEquals(\"tool\", toolMojo.getGoCommand());\n    assertFalse(toolMojo.isVerbose());\n    assertTrue(toolMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", toolMojo.getSources(false).getPath());\n    assertEquals(\"theCommand\", toolMojo.getCommand());\n    assertEqualsPath(\"some/root\", toolMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(toolMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"theCommand\", \"arg1\", \"arg2\"}, toolMojo.getTailArguments());\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, toolMojo.getBuildFlags());\n    assertArrayEquals(new String[] {\"arg1\", \"arg2\"}, toolMojo.getArgs());\n  }\n\n  @Test\n  public void testGolangModMojoConfiguration() throws Exception {\n    final GolangModMojo modMojo = findMojo(GolangModMojo.class, \"mojoMod.xml\", \"mod\");\n    assertTrue(modMojo.isModuleMode());\n    assertArrayEquals(new String[] {\"someCommand\"}, modMojo.getCommandFlags());\n    assertArrayEquals(new String[] {\"one\", \"two\", \"three\"}, modMojo.getTailArguments());\n  }\n\n  @Test\n  public void testGolangRunMojoConfiguration() throws Exception {\n    final GolangRunMojo runMojo = findMojo(GolangRunMojo.class, \"mojoRun.xml\", \"run\");\n    assertEquals(60000, runMojo.getConnectionTimeout());\n    assertTrue(runMojo.isUseMavenProxy());\n    assertNull(runMojo.getProxy());\n    assertFalse(runMojo.isSkip());\n    assertFalse(runMojo.isUseEnvVars());\n    assertNull(runMojo.getTargetArm());\n    assertEquals(\"run\", runMojo.getGoCommand());\n    assertFalse(runMojo.isVerbose());\n    assertTrue(runMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", runMojo.getSources(false).getPath());\n    assertEquals(\"main.go\", runMojo.getPackages()[0]);\n    assertEqualsPath(\"some/root\", runMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(runMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"arg1\", \"arg2\"}, runMojo.getArgs());\n    assertArrayEquals(new String[] {\"main.go\", \"arg1\", \"arg2\"}, runMojo.getTailArguments());\n  }\n\n  @Test\n  public void testGolangGetMojoConfiguration() throws Exception {\n    final GolangGetMojo getMojo = findMojo(GolangGetMojo.class, \"mojoGet.xml\", \"get\");\n\n    final ProxySettings proxy = getMojo.getProxy();\n\n    final CustomScript script = getMojo.getCustomScript();\n    assertFalse(getMojo.isFilterEnvPath());\n    assertEquals(123000, getMojo.getConnectionTimeout());\n    assertEquals(\"some/test/script\", script.path);\n    assertTrue(script.ignoreFail);\n    assertArrayEquals(new String[] {\"some1\", \"some2\", \"some3\"}, script.options);\n\n    assertEquals(\"https\", proxy.protocol);\n    assertEquals(\"127.33.44.55\", proxy.host);\n    assertEquals(999, proxy.port);\n    assertEquals(\"some user\", proxy.username);\n    assertEquals(\"verysecretpassword\", proxy.password);\n    assertEquals(\"127.0.0.1|127.0.0.2|127.0.0.3\", proxy.nonProxyHosts);\n\n    assertTrue(getMojo.getDeleteCommonPkg());\n\n    assertTrue(getMojo.isDisableCvsAutoSearch());\n    assertEquals(\"some/relative/path\", getMojo.getRelativePathToCvsFolder());\n\n    assertArrayEquals(new String[] {\"one\", \"two\", \"three\", \"four\"}, getMojo.getCustomCvsOptions());\n\n    assertEquals(\"some/custom/exe.exe\", getMojo.getCvsExe());\n    assertTrue(getMojo.isEnforceDeletePackageFiles());\n    assertFalse(getMojo.isUseMavenProxy());\n    assertFalse(getMojo.isSkip());\n    assertFalse(getMojo.isUseEnvVars());\n    assertEquals(\"get\", getMojo.getGoCommand());\n    assertNull(getMojo.getUseGoTool());\n    assertNull(getMojo.getTargetArm());\n    assertTrue(getMojo.isAutoFixGitCache());\n    assertFalse(getMojo.isVerbose());\n    assertTrue(getMojo.isHideBanner());\n    assertEqualsPath(\"some/sources\", getMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", getMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(getMojo.findGoPath(false)));\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, getMojo.getBuildFlags());\n//    assertEquals(\"test.txt\",getMojo.getExternalPackageFile());\n    assertEquals(\"bin\", getMojo.getExecSubpath());\n    assertEquals(\"go\", getMojo.getExec());\n  }\n\n  @Test\n  public void testGolangBuildMojoConfiguration() throws Exception {\n    final GolangBuildMojo buildMojo = findMojo(GolangBuildMojo.class, \"mojoBuild.xml\", \"build\");\n    assertEquals(\"some/working/dir\", buildMojo.getWorkingDir());\n    assertEquals(60000, buildMojo.getConnectionTimeout());\n    assertTrue(buildMojo.isUseMavenProxy());\n    assertNull(buildMojo.getProxy());\n    assertNotNull(buildMojo);\n    assertTrue(buildMojo.isSkip());\n    assertTrue(buildMojo.isEnforceGoPathToEnd());\n    assertEquals(\"somearch\", buildMojo.getTargetArch());\n    assertEquals(\"someos\", buildMojo.getTargetOS());\n    assertEquals(\"5566677\", buildMojo.getTargetArm());\n    assertFalse(buildMojo.isUseEnvVars());\n    assertEquals(\"build\", buildMojo.getGoCommand());\n    assertEquals(\"someGo.bat\", buildMojo.getUseGoTool());\n    assertFalse(buildMojo.isVerbose());\n    assertFalse(buildMojo.isHideBanner());\n    assertEquals(\"plugin\", buildMojo.getBuildMode());\n    assertTrue(buildMojo.isStrip());\n    assertEqualsPath(\"some/sources\", buildMojo.getSources(false).getPath());\n    assertEqualsPath(\"some/root\", buildMojo.getGoRoot());\n    assertEqualsPath(\"some/path\",\n        IOUtils.makeOsFilePathWithoutDuplications(buildMojo.findGoPath(false)));\n    assertEqualsPath(\"target/place\", buildMojo.getResultFolder());\n    assertEquals(\"targetName\", buildMojo.getResultName());\n    assertArrayEquals(new String[] {\"one_pack\", \"two_pack\"}, buildMojo.getTailArguments());\n    assertArrayEquals(new String[] {\"flag1\", \"flag2\"}, buildMojo.getBuildFlags());\n    assertArrayEquals(new String[] {\"-extldflags\", \"\\\"-static\\\"\"},\n        buildMojo.getLdflagsAsList().toArray());\n    assertEquals(1, buildMojo.getEnv().size());\n    assertEquals(\"somevalue\", buildMojo.getEnv().get(\"somekey\"));\n    assertEquals(\"bin/misc\", buildMojo.getExecSubpath());\n    assertEquals(\"gomobile\", buildMojo.getExec());\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/java/com/igormaznitsa/mvngolang/utils/GoModTest.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport static org.junit.Assert.assertEquals;\n\n\nimport java.util.List;\nimport org.junit.Test;\n\npublic class GoModTest {\n\n  private void assertModules(final GoMod model, final String... texts) {\n    final List<GoMod.GoModule> modules = model.find(GoMod.GoModule.class);\n    assertEquals(texts.length, modules.size());\n    for (int i = 0; i < texts.length; i++) {\n      assertEquals(texts[i], modules.get(i).getModuleInfo().getName());\n    }\n  }\n\n  @Test\n  public void testComplex1() {\n    final GoMod model = GoMod.from(\"module github.com/maruel/panicparse\\n\"\n        + \"\\n\"\n        + \"go 1.11\\n\"\n        + \"\\n\"\n        + \"require (\\n\"\n        + \"\tgithub.com/mattn/go-colorable v0.1.1\\n\"\n        + \"\tgithub.com/mattn/go-isatty v0.0.7\\n\"\n        + \"\tgithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b\\n\"\n        + \")\");\n\n    assertEquals(5, model.size());\n\n    assertEquals(\"module github.com/maruel/panicparse\\n\"\n        + \"require github.com/mattn/go-colorable v0.1.1\\n\"\n        + \"require github.com/mattn/go-isatty v0.0.7\\n\"\n        + \"require github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b\\n\"\n        + \"go 1.11\", model.toString());\n  }\n\n  @Test\n  public void testComplex2() {\n    final GoMod model = GoMod.from(\"module google.golang.org/api\\n\"\n        + \"\\n\"\n        + \"require (\\n\"\n        + \"\tcloud.google.com/go v0.38.0 // indirect\\n\"\n        + \"\tgithub.com/golang/protobuf v1.3.1 // indirect\\n\"\n        + \"\tgithub.com/google/go-cmp v0.3.0\\n\"\n        + \"\tgithub.com/hashicorp/golang-lru v0.5.1 // indirect\\n\"\n        + \"\tgo.opencensus.io v0.21.0\\n\"\n        + \"\tgolang.org/x/lint v0.0.0-20190409202823-959b441ac422\\n\"\n        + \"\tgolang.org/x/net v0.0.0-20190503192946-f4e77d36d62c // indirect\\n\"\n        + \"\tgolang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45\\n\"\n        + \"\tgolang.org/x/sync v0.0.0-20190423024810-112230192c58\\n\"\n        + \"\tgolang.org/x/sys v0.0.0-20190507160741-ecd444e8653b\\n\"\n        + \"\tgolang.org/x/text v0.3.2 // indirect\\n\"\n        + \"\tgolang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c\\n\"\n        + \"\tgoogle.golang.org/appengine v1.5.0\\n\"\n        + \"\tgoogle.golang.org/genproto v0.0.0-20190502173448-54afdca5d873\\n\"\n        + \"\tgoogle.golang.org/grpc v1.20.1\\n\"\n        + \"\thonnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a\\n\"\n        + \")\");\n\n    assertEquals(17, model.size());\n\n    assertEquals(\"module google.golang.org/api\\n\"\n        + \"require cloud.google.com/go v0.38.0\\n\"\n        + \"require github.com/golang/protobuf v1.3.1\\n\"\n        + \"require github.com/google/go-cmp v0.3.0\\n\"\n        + \"require github.com/hashicorp/golang-lru v0.5.1\\n\"\n        + \"require go.opencensus.io v0.21.0\\n\"\n        + \"require golang.org/x/lint v0.0.0-20190409202823-959b441ac422\\n\"\n        + \"require golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c\\n\"\n        + \"require golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45\\n\"\n        + \"require golang.org/x/sync v0.0.0-20190423024810-112230192c58\\n\"\n        + \"require golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b\\n\"\n        + \"require golang.org/x/text v0.3.2\\n\"\n        + \"require golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c\\n\"\n        + \"require google.golang.org/appengine v1.5.0\\n\"\n        + \"require google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873\\n\"\n        + \"require google.golang.org/grpc v1.20.1\\n\"\n        + \"require honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a\", model.toString());\n  }\n\n  @Test\n  public void testComplex3() {\n    GoMod model = GoMod.from(\"module \\\"rsc.io/sampler\\\"\\n\"\n        + \"\\n\"\n        + \"require \\\"golang.org/x/text\\\" v0.0.0-20170915032832-14c0d48ead0c\");\n    assertEquals(2, model.size());\n    model = GoMod.from(\"module m\\n\"\n        + \"\\n\"\n        + \"go 1.11\\n\"\n        + \"\\n\"\n        + \"require (\\n\"\n        + \"\texample.com/a v1.0.0\\n\"\n        + \"\texample.com/d v1.0.0 // indirect\\n\"\n        + \")\\n\"\n        + \"\\n\"\n        + \"replace example.com/a => example.com/c v1.0.0\");\n    assertEquals(5, model.size());\n\n    assertEquals(\"module m\\n\"\n        + \"require example.com/a v1.0.0\\n\"\n        + \"require example.com/d v1.0.0\\n\"\n        + \"replace example.com/a => example.com/c v1.0.0\\n\"\n        + \"go 1.11\", model.toString());\n  }\n\n  @Test\n  public void testComplex4() {\n    final GoMod model = GoMod.from(\"module example.com/me/hello\\n\"\n        + \"\\n\"\n        + \"    require (\\n\"\n        + \"     example.com/me/goodbye v0.0.0\\n\"\n        + \"     rsc.io/quote v1.5.2\\n\"\n        + \"    )\\n\"\n        + \"\\n\"\n        + \"    replace example.com/me/goodbye => ../goodbye\");\n    assertEquals(4, model.size());\n\n    assertEquals(\"module example.com/me/hello\\n\"\n        + \"require example.com/me/goodbye v0.0.0\\n\"\n        + \"require rsc.io/quote v1.5.2\\n\"\n        + \"replace example.com/me/goodbye => ../goodbye\", model.toString());\n  }\n\n  @Test\n  public void testComplex4WindowsPath() {\n    final GoMod model = GoMod.from(\"module example.com/me/hello\\n\"\n        + \"\\n\"\n        + \"    require (\\n\"\n        + \"     example.com/me/goodbye v0.0.0\\n\"\n        + \"     rsc.io/quote v1.5.2\\n\"\n        + \"    )\\n\"\n        + \"\\n\"\n        + \"    replace example.com/me/goodbye => ..\\\\..\\\\goodbye\");\n    assertEquals(4, model.size());\n\n    assertEquals(\"module example.com/me/hello\\n\"\n        + \"require example.com/me/goodbye v0.0.0\\n\"\n        + \"require rsc.io/quote v1.5.2\\n\"\n        + \"replace example.com/me/goodbye => ..\\\\..\\\\goodbye\", model.toString());\n  }\n  \n  @Test\n  public void testComplex5() {\n    final GoMod model = GoMod.from(\"module github.com/example/project\\n\"\n        + \"\\n\"\n        + \"require (\\n\"\n        + \"    github.com/SermoDigital/jose v0.0.0-20180104203859-803625baeddc\\n\"\n        + \"    github.com/google/uuid v1.1.0\\n\"\n        + \")\\n\"\n        + \"\\n\"\n        + \"exclude github.com/SermoDigital/jose v0.9.1\\n\"\n        + \"\\n\"\n        + \"replace github.com/google/uuid v1.1.0 => git.coolaj86.com/coolaj86/uuid.go v1.1.1\");\n    assertEquals(5, model.size());\n\n    assertEquals(\"module github.com/example/project\\n\"\n        + \"require github.com/SermoDigital/jose v0.0.0-20180104203859-803625baeddc\\n\"\n        + \"require github.com/google/uuid v1.1.0\\n\"\n        + \"replace github.com/google/uuid v1.1.0 => git.coolaj86.com/coolaj86/uuid.go v1.1.1\\n\"\n        + \"exclude github.com/SermoDigital/jose v0.9.1\", model.toString());\n  }\n\n  @Test\n  public void testModule() {\n    assertModules(GoMod.from(\"module (example.com/hello) // huzzaa\"), \"example.com/hello\");\n    assertModules(GoMod.from(\"module (\\n\"\n        + \"example.com/hello // some\\n\"\n        + \"  \\\"sss.gid/fsdsd\\\"   \\n\"\n        + \") // huzzaa\"), \"example.com/hello\", \"sss.gid/fsdsd\");\n    assertModules(GoMod.from(\"module (example.com/hello) // huzzaa\"), \"example.com/hello\");\n    assertModules(GoMod.from(\"module example.com/hello\"), \"example.com/hello\");\n    assertModules(GoMod.from(\"module example.com/hello\\n\"), \"example.com/hello\");\n    assertModules(GoMod.from(\"module example.com/hello // huzzaa\"), \"example.com/hello\");\n    assertModules(GoMod.from(\"\\n   \\n    module \\\"example.com/hello\\\" // huzzaa\"),\n        \"example.com/hello\");\n    assertModules(GoMod.from(\"module \\\"example.com/hello\\\"\"), \"example.com/hello\");\n    assertModules(GoMod.from(\"module \\\"example.com/hello\\\"\\n\"), \"example.com/hello\");\n    assertModules(GoMod.from(\"module \\\"example.com/hello\\\" // huzzaa\"), \"example.com/hello\");\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/java/com/igormaznitsa/mvngolang/utils/MavenUtilsTest.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport static org.junit.Assert.assertEquals;\n\n\nimport org.apache.maven.artifact.DefaultArtifact;\nimport org.junit.Test;\n\npublic class MavenUtilsTest {\n\n  @Test\n  public void testArtifactWithVersion() throws Exception {\n    final DefaultArtifact artifact =\n        new DefaultArtifact(\"com.igormaznitsa\", \"some-plugin-test\", \"1.0\", \"compile\", \"jar\", null,\n            new MvnGolangArtifactHandler());\n    assertEquals(artifact, MavenUtils.parseArtifactRecord(MavenUtils.makeArtifactRecord(artifact),\n        new MvnGolangArtifactHandler()));\n  }\n\n  @Test\n  public void testArtifactWithVersionRange_TwoVersions() throws Exception {\n    final DefaultArtifact artifact =\n        new DefaultArtifact(\"com.igormaznitsa\", \"some-plugin-test\", \"1.0,2.3\", \"compile\", \"jar\",\n            null, new MvnGolangArtifactHandler());\n    assertEquals(artifact, MavenUtils.parseArtifactRecord(MavenUtils.makeArtifactRecord(artifact),\n        new MvnGolangArtifactHandler()));\n  }\n\n  @Test\n  public void testArtifactWithVersionRange_RangeDiapasone() throws Exception {\n    final DefaultArtifact artifact =\n        new DefaultArtifact(\"com.igormaznitsa\", \"some-plugin-test\", \"(,1.0]\", \"compile\", \"jar\",\n            null, new MvnGolangArtifactHandler());\n    assertEquals(artifact, MavenUtils.parseArtifactRecord(MavenUtils.makeArtifactRecord(artifact),\n        new MvnGolangArtifactHandler()));\n  }\n\n  @Test\n  public void testArtifactWithVersionRange_AllFieldsSet() throws Exception {\n    final DefaultArtifact artifact =\n        new DefaultArtifact(\"com.igormaznitsa\", \"some-plugin-test\", \"(,1.0]\", \"compile\", \"jar\",\n            \"someclassifier\", new MvnGolangArtifactHandler());\n    assertEquals(artifact, MavenUtils.parseArtifactRecord(MavenUtils.makeArtifactRecord(artifact),\n        new MvnGolangArtifactHandler()));\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/java/com/igormaznitsa/mvngolang/utils/PackageListTest.java",
    "content": "/*\n * Copyright 2018 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertNull;\n\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.text.ParseException;\nimport javax.annotation.Nonnull;\nimport org.apache.commons.io.FilenameUtils;\nimport org.junit.Test;\n\npublic class PackageListTest {\n\n  private static final File FAKE_FILE = new File(\".\");\n\n  private static final PackageList.ContentProvider STUB_CP = new PackageList.ContentProvider() {\n    @Override\n    @Nonnull\n    public String readContent(@Nonnull final File file) throws IOException {\n      throw new Error(\"Must not be called\");\n    }\n  };\n\n  @Test\n  public void testRemoveQuotes() {\n    assertEquals(\"\", PackageList.removeQuotes(\"\"));\n    assertEquals(\"\\\"\", PackageList.removeQuotes(\"\\\"\"));\n    assertEquals(\"\", PackageList.removeQuotes(\"\\\"\\\"\"));\n    assertEquals(\"a\", PackageList.removeQuotes(\"\\\"a\\\"\"));\n    assertEquals(\"a\\\"\", PackageList.removeQuotes(\"a\\\"\"));\n    assertEquals(\"\\\"\", PackageList.removeQuotes(\"\\\"\\\"\\\"\"));\n  }\n\n  @Test\n  public void testRemoveComment_CheckQuotes_False() {\n    assertEquals(\"\", PackageList.removeComment(\"//\", false));\n    assertEquals(\"a\", PackageList.removeComment(\"a//\", false));\n    assertEquals(\"a\", PackageList.removeComment(\"a//b\", false));\n    assertEquals(\"a \", PackageList.removeComment(\"a //b\", false));\n    assertEquals(\"#include\", PackageList.removeComment(\"#include//dddd\", false));\n    assertEquals(\"#include a/b/c\", PackageList.removeComment(\"#include a/b/c//dddd\", false));\n    assertEquals(\"#include \\\"a/b/c\", PackageList.removeComment(\"#include \\\"a/b/c//dddd\\\"\", false));\n    assertEquals(\"#include \\\"a/b/c\",\n        PackageList.removeComment(\"#include \\\"a/b/c//dddd\\\" // jjj\", false));\n    assertEquals(\"#include \\\"a/b/c\\\"\",\n        PackageList.removeComment(\"#include \\\"a/b/c\\\"//dddd\\\"\", false));\n  }\n\n  @Test\n  public void testRemoveComment_CheckQuotes_True() {\n    assertEquals(\"\", PackageList.removeComment(\"//\", true));\n    assertEquals(\"a\", PackageList.removeComment(\"a//\", true));\n    assertEquals(\"a\", PackageList.removeComment(\"a//b\", true));\n    assertEquals(\"a \", PackageList.removeComment(\"a //b\", true));\n    assertEquals(\"#include\", PackageList.removeComment(\"#include//dddd\", true));\n    assertEquals(\"#include a/b/c\", PackageList.removeComment(\"#include a/b/c//dddd\", true));\n    assertEquals(\"#include \\\"a/b/c//dddd\\\"\",\n        PackageList.removeComment(\"#include \\\"a/b/c//dddd\\\"\", true));\n    assertEquals(\"#include \\\"a/b/c//dddd\\\" \",\n        PackageList.removeComment(\"#include \\\"a/b/c//dddd\\\" // kkkk\", true));\n    assertEquals(\"#include \\\"a/b/c\\\"\",\n        PackageList.removeComment(\"#include \\\"a/b/c\\\"//dddd\\\"\", true));\n  }\n\n  @Test\n  public void testEmptyText() throws Exception {\n    assertEquals(0, new PackageList(FAKE_FILE, \"\", STUB_CP).getPackages().size());\n  }\n\n  @Test\n  public void testOnlyCommentLine() throws Exception {\n    assertEquals(0, new PackageList(FAKE_FILE, \"// comment\", STUB_CP).getPackages().size());\n  }\n\n  @Test\n  public void testOnlyPackageName() throws Exception {\n    final PackageList parsed =\n        new PackageList(FAKE_FILE, \"// text\\npackage: github.com/gizak/termui\", STUB_CP);\n    assertEquals(1, parsed.getPackages().size());\n    assertEquals(\"github.com/gizak/termui\", parsed.getPackages().get(0).getPackage());\n    assertNull(parsed.getPackages().get(0).getBranch());\n    assertNull(parsed.getPackages().get(0).getRevision());\n    assertNull(parsed.getPackages().get(0).getTag());\n  }\n\n  @Test\n  public void testTwoPackages() throws Exception {\n    final PackageList parsed = new PackageList(FAKE_FILE, \"// text\\n\"\n        + \"package: github.com/gizak/termui // ,tag:mustbeignored\\n\"\n        + \"package: some/pack , branch:445566, tag:sometag, revision: r.33.3434342323\", STUB_CP);\n    assertEquals(2, parsed.getPackages().size());\n\n    assertEquals(\"github.com/gizak/termui\", parsed.getPackages().get(0).getPackage());\n    assertNull(parsed.getPackages().get(0).getBranch());\n    assertNull(parsed.getPackages().get(0).getRevision());\n    assertNull(parsed.getPackages().get(0).getTag());\n\n    assertEquals(\"some/pack\", parsed.getPackages().get(1).getPackage());\n    assertEquals(\"445566\", parsed.getPackages().get(1).getBranch());\n    assertEquals(\"sometag\", parsed.getPackages().get(1).getTag());\n    assertEquals(\"r.33.3434342323\", parsed.getPackages().get(1).getRevision());\n  }\n\n  @Test\n  public void testInclude() throws Exception {\n    final PackageList parsed = new PackageList(FAKE_FILE,\n        \"#include \\\"./another\\\"//testinclude\\npackage: one\\npackage: two\",\n        new PackageList.ContentProvider() {\n          @Override\n          @Nonnull\n          public String readContent(@Nonnull final File pathElements) throws IOException {\n            assertEquals(\"another\", FilenameUtils.normalize(pathElements.getPath()));\n            return \"package: external\";\n          }\n        });\n\n    assertEquals(3, parsed.getPackages().size());\n    assertEquals(\"external\", parsed.getPackages().get(0).getPackage());\n    assertEquals(\"one\", parsed.getPackages().get(1).getPackage());\n    assertEquals(\"two\", parsed.getPackages().get(2).getPackage());\n  }\n\n  @Test(expected = ParseException.class)\n  public void testWrongFormat_NoKey() throws Exception {\n    new PackageList(FAKE_FILE, \":jjj\", STUB_CP);\n  }\n\n  @Test(expected = ParseException.class)\n  public void testWrongFormat_OnlyKey() throws Exception {\n    new PackageList(FAKE_FILE, \"package:\", STUB_CP);\n  }\n\n  @Test(expected = IllegalArgumentException.class)\n  public void testWrongFormat_WrongKey() throws Exception {\n    new PackageList(FAKE_FILE, \"packge: some\", STUB_CP);\n  }\n\n  @Test(expected = ParseException.class)\n  public void testWrongFormat_DoubleQuotes() throws Exception {\n    new PackageList(FAKE_FILE,\n        \"package: some/pack , branch:445566, tag:sometag,, revision: r.33.3434342323\", STUB_CP);\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/java/com/igormaznitsa/mvngolang/utils/StringComparatorABCTest.java",
    "content": "/*\n * Copyright 2016 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport static org.junit.Assert.assertArrayEquals;\n\n\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\nimport org.junit.Test;\n\npublic class StringComparatorABCTest {\n\n  @Test\n  public void testSorting() {\n    final List<String> list = Arrays.asList(\"b\", \"c\", \"1\", \"hello\", \"ABC\", \"A\");\n    Collections.sort(list, StringComparatorABC.getInstance());\n    assertArrayEquals(new String[] {\"1\", \"A\", \"ABC\", \"b\", \"c\", \"hello\"}, list.toArray());\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/java/com/igormaznitsa/mvngolang/utils/SysUtilsTest.java",
    "content": "/*\n * Copyright 2019 Igor Maznitsa.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.igormaznitsa.mvngolang.utils;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertNull;\n\n\nimport org.junit.Test;\n\npublic class SysUtilsTest {\n\n  @Test\n  public void testDecodeGoSdkArchType() {\n    assertNull(SysUtils.decodeGoSdkArchType(\"some xxx\"));\n    assertEquals(\"armv6l\", SysUtils.decodeGoSdkArchType(\"some armv6l xxx\"));\n    assertEquals(\"ppc64le\", SysUtils.decodeGoSdkArchType(\"ppc ppc64le\"));\n    assertEquals(\"ppc64le\", SysUtils.decodeGoSdkArchType(\"ppc64le\"));\n    assertEquals(\"386\", SysUtils.decodeGoSdkArchType(\"i386\"));\n    assertEquals(\"386\", SysUtils.decodeGoSdkArchType(\"i686\"));\n    assertEquals(\"amd64\", SysUtils.decodeGoSdkArchType(\"amd64\"));\n    assertEquals(\"arm64\", SysUtils.decodeGoSdkArchType(\"aarch64\"));\n    assertEquals(\"s390x\", SysUtils.decodeGoSdkArchType(\"s390\"));\n  }\n\n}\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoBuild.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>build</goal>\n                </goals>\n                <configuration>\n                    <skip>true</skip>\n                    <workingDir>some/working/dir</workingDir>\n                    <useMavenProxy>true</useMavenProxy>\n                    <targetOs>someos</targetOs>\n                    <targetArch>somearch</targetArch>\n                    <targetArm>5566677</targetArm>\n                    <useGoTool>someGo.bat</useGoTool>\n                    <resultFolder>target/place</resultFolder>\n                    <resultName>targetName</resultName>\n                    <hideBanner>false</hideBanner>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <exec>gomobile</exec>\n                    <execSubpath>/bin/misc/</execSubpath>\n                    <buildMode>plugin</buildMode>\n                    <strip>true</strip>\n                    <enforceGoPathToEnd>true</enforceGoPathToEnd>\n                    <ldFlags>\n                        <flag>-extldflags</flag>\n                        <flag>\"-static\"</flag>\n                    </ldFlags>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <packages>\n                        <package>one_pack</package>\n                        <package>two_pack</package>\n                    </packages>\n                    <env>\n                        <somekey>somevalue</somekey>\n                    </env>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoClean.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <properties>\n        <mvn.golang.module.mode>true</mvn.golang.module.mode>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>clean</goal>\n                </goals>\n                <configuration>\n                    <moduleMode>true</moduleMode>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <packages>\n                        <package>one_pack</package>\n                        <package>two_pack</package>\n                    </packages>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoCustom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>custom</goal>\n                </goals>\n                <configuration>\n                    <useMavenProxy>false</useMavenProxy>\n                    <checkSdkHash>false</checkSdkHash>\n                    <supposeSdkArchiveFileName>false</supposeSdkArchiveFileName>\n                    <customCommand>someCustomCommand</customCommand>\n                    <target386>387</target386>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <packages>\n                        <package>one_pack</package>\n                        <package>two_pack</package>\n                    </packages>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoFix.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>fix</goal>\n                </goals>\n                <configuration>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <disableSSLcheck>true</disableSSLcheck>\n                    <sources>some/sources</sources>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <packages>\n                        <package>one_pack</package>\n                        <package>two_pack</package>\n                    </packages>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoFmt.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>fmt</goal>\n                </goals>\n                <configuration>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <packages>\n                        <package>one_pack</package>\n                        <package>two_pack</package>\n                    </packages>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoGenerate.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>generate</goal>\n                </goals>\n                <configuration>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <packages>\n                        <package>one_pack</package>\n                        <package>two_pack</package>\n                    </packages>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoGet.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>get</goal>\n                </goals>\n                <configuration>\n                    <proxy>\n                        <protocol>https</protocol>\n                        <host>127.33.44.55</host>\n                        <port>999</port>\n                        <username>some user</username>\n                        <password>verysecretpassword</password>\n                        <nonProxyHosts>127.0.0.1|127.0.0.2|127.0.0.3</nonProxyHosts>\n                    </proxy>\n                    <filterEnvPath>false</filterEnvPath>\n                    <connectionTimeout>123000</connectionTimeout>\n                    <externalPackageFile>test.txt</externalPackageFile>\n                    <useMavenProxy>false</useMavenProxy>\n                    <deleteCommonPkg>true</deleteCommonPkg>\n                    <cvsExe>some/custom/exe.exe</cvsExe>\n                    <autofixGitCache>true</autofixGitCache>\n                    <relativePathToCvsFolder>some/relative/path</relativePathToCvsFolder>\n                    <disableCvsAutosearch>true</disableCvsAutosearch>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <enforceDeletePackageFiles>true</enforceDeletePackageFiles>\n                    <customCvsOptions>\n                        <op>one</op>\n                        <op>two</op>\n                        <op>three</op>\n                        <op>four</op>\n                    </customCvsOptions>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <packages>\n                        <package>one_pack</package>\n                        <package>two_pack</package>\n                    </packages>\n                    <customScript>\n                        <path>some/test/script</path>\n                        <options>\n                            <option>some1</option>\n                            <option>some2</option>\n                            <option>some3</option>\n                        </options>\n                        <ignoreFail>true</ignoreFail>\n                    </customScript>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoInstall.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>install</goal>\n                </goals>\n                <configuration>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <packages>\n                        <package>one_pack</package>\n                        <package>two_pack</package>\n                    </packages>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoJFrogCli.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>jfrog-cli</goal>\n                </goals>\n                <configuration>\n                    <useMavenProxy>false</useMavenProxy>\n                    <checkSdkHash>false</checkSdkHash>\n                    <supposeSdkArchiveFileName>false</supposeSdkArchiveFileName>\n                    <target386>387</target386>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <goCache>some/path/cache</goCache>\n\n                    <cliPath>some/jfrog</cliPath>\n                    <target>mc</target>\n                    <command>s</command>\n                    <arguments>\n                        <argument>add</argument>\n                        <argument>ARTIFACTORY</argument>\n                        <argument>my-arti</argument>\n                        <argument>--service-url=http://10.100.1.127</argument>\n                        <argument>--service-user=admin</argument>\n                        <argument>--service-password=password</argument>\n                    </arguments>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>\n"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoMod.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>mod</goal>\n                </goals>\n                <configuration>\n                    <command>someCommand</command>\n                    <arguments>\n                        <arg>one</arg>\n                        <arg>two</arg>\n                        <arg>three</arg>\n                    </arguments>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoMvnInstall.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>mvninstall</goal>\n                </goals>\n                <configuration>\n                    <compression>3</compression>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoRun.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Run GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>run</goal>\n                </goals>\n                <configuration>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <packages>\n                        <package>main.go</package>\n                    </packages>\n                    <args>\n                        <arg>arg1</arg>\n                        <arg>arg2</arg>\n                    </args>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoTest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>test</goal>\n                </goals>\n                <configuration>\n                    <scanDependencies>false</scanDependencies>\n                    <includeTestDependencies>false</includeTestDependencies>\n                    <dependencyTempFolder>some/someTempFolder</dependencyTempFolder>\n                    <ignoreErrorExitCode>true</ignoreErrorExitCode>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <packages>\n                        <package>one_pack</package>\n                        <package>two_pack</package>\n                    </packages>\n                    <testFlags>\n                        <flag>binFlag1</flag>\n                        <flag>binFlag2</flag>\n                    </testFlags>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoTool.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>tool</goal>\n                </goals>\n                <configuration>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <command>theCommand</command>\n                    <args>\n                        <arg>arg1</arg>\n                        <arg>arg2</arg>\n                    </args>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "mvn-golang-wrapper/src/test/resources/com/igormaznitsa/mvngolang/mojoVet.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.igormaznitsa</groupId>\n    <artifactId>mvngolang-tests</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n\n    <packaging>jar</packaging>\n    <name>Test GoLangMojo</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>com.igormaznitsa</groupId>\n                <artifactId>mvn-golang-wrapper</artifactId>\n                <goals>\n                    <goal>vet</goal>\n                </goals>\n                <configuration>\n                    <goRoot>some/root</goRoot>\n                    <goPath>some/path</goPath>\n                    <sources>some/sources</sources>\n                    <buildFlags>\n                        <flag>flag1</flag>\n                        <flag>flag2</flag>\n                    </buildFlags>\n                    <packages>\n                        <package>one_pack</package>\n                        <package>two_pack</package>\n                    </packages>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n</project>"
  },
  {
    "path": "pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>com.igormaznitsa</groupId>\n  <artifactId>mvn-golang</artifactId>\n  <version>2.3.11-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <name>mvn-golang</name>\n  <description>Maven plugin to wrap main GoLang commands and provide way to build GoLang applications with Apache Maven build tool.</description>\n  <url>https://github.com/raydac/mvn-golang</url>\n    \n  <inceptionYear>2016</inceptionYear>\n    \n  <properties>\n    <main-project-version>2.3.10</main-project-version>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>\n    <meta.version>1.1.3</meta.version>\n    <uber.pom>1.0.3</uber.pom>\n    <mvn.version>3.0</mvn.version>\n  </properties>\n\n  <issueManagement>\n    <system>GitHub Issues</system>\n    <url>https://github.com/raydac/mvn-golang/issues</url>\n  </issueManagement>\n\n  <developers>\n    <developer>\n      <id>raydac</id>\n      <name>Igor Maznitsa</name>\n      <email>rrg4400@gmail.com</email>\n      <url>https://www.igormaznitsa.com</url>\n      <timezone>+2</timezone>\n      <roles>\n        <role>developer</role>\n      </roles>\n    </developer>\n  </developers>\n    \n  <scm>\n    <url>https://github.com/raydac/mvn-golang</url>\n    <connection>scm:git:git://github.com/raydac/mvn-golang.git</connection>\n    <developerConnection>scm:git:git@github.com:raydac/mvn-golang.git</developerConnection>\n  </scm>\n\n  <organization>\n    <name>Igor Maznitsa</name>\n    <url>http://www.igormaznitsa.com</url>\n  </organization>\n\n  <licenses>\n    <license>\n      <name>The Apache Software License, Version 2.0</name>\n      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n      <distribution>repo</distribution>\n    </license>\n  </licenses>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.2</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <profiles>\n    <profile>\n      <id>plugin</id>\n      <activation>\n        <activeByDefault>true</activeByDefault>\n      </activation>\n      <modules>\n        <module>mvn-golang-wrapper</module>\n        <module>mvn-golang-hello</module>\n        <module>mvn-golang-hello-multi</module>\n      </modules>\n    </profile>\n    <profile>\n      <id>examples</id>\n      <modules>\n        <module>mvn-golang-examples</module>\n      </modules>\n    </profile>\n  </profiles>\n  \n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-enforcer-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>no-duplicate-declared-dependencies</id>\n            <goals>\n              <goal>enforce</goal>\n            </goals>\n            <configuration>\n              <rules>\n                <banDuplicatePomDependencyVersions/>\n              </rules>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-plugin-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>default-descriptor</id>\n            <phase>process-classes</phase>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-enforcer-plugin</artifactId>\n          <version>3.0.0</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-gpg-plugin</artifactId>\n          <version>3.2.4</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-assembly-plugin</artifactId>\n          <version>3.7.1</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-source-plugin</artifactId>\n          <version>3.3.1</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-javadoc-plugin</artifactId>\n          <version>3.7.0</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>3.13.0</version>\n          <configuration>\n            <compilerArgument>-Xlint:all</compilerArgument>\n            <target>1.8</target>\n            <source>1.8</source>\n            <!-- Don't use <release>8</release> for compatibility with build under JDK8 -->\n            <verbose>false</verbose>\n            <showDeprecation>true</showDeprecation>\n            <showWarnings>true</showWarnings>\n          </configuration>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-plugin-plugin</artifactId>\n          <version>3.5.2</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-install-plugin</artifactId>\n          <version>2.5.2</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-deploy-plugin</artifactId>\n          <version>2.8.2</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-resources-plugin</artifactId>\n          <version>3.1.0</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-jar-plugin</artifactId>\n          <version>3.1.0</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-surefire-plugin</artifactId>\n          <version>2.22.0</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-failsafe-plugin</artifactId>\n          <version>2.22.0</version>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-clean-plugin</artifactId>\n          <version>3.1.0</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n\n  </build>\n</project>\n"
  }
]