{"id":26737107,"url":"https://github.com/tymonx/docker-go","last_synced_at":"2025-10-27T00:12:02.368Z","repository":{"id":83533897,"uuid":"267651548","full_name":"tymonx/docker-go","owner":"tymonx","description":"A Docker image with preinstalled tools for developing, mocking, formatting, linting, building, testing and documenting Go projects. It is only a read-only project mirror. Active development is maintained at the GitLab.","archived":false,"fork":false,"pushed_at":"2021-02-09T08:16:38.000Z","size":207,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T02:42:54.689Z","etag":null,"topics":["ci","ci-cd","cicd","continuous-integration","continuous-testing","devops","devops-tools","docker","docker-image","documentation","go","golang","mock","mocking","productivity","programming","test","testing","testing-tools","tests"],"latest_commit_sha":null,"homepage":"https://gitlab.com/tymonx/docker-go","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tymonx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-28T17:20:46.000Z","updated_at":"2022-12-07T18:00:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"222f733d-9329-4950-b5d6-ceb2b10401b0","html_url":"https://github.com/tymonx/docker-go","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/tymonx/docker-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tymonx%2Fdocker-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tymonx%2Fdocker-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tymonx%2Fdocker-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tymonx%2Fdocker-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tymonx","download_url":"https://codeload.github.com/tymonx/docker-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tymonx%2Fdocker-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259352434,"owners_count":22844736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","ci-cd","cicd","continuous-integration","continuous-testing","devops","devops-tools","docker","docker-image","documentation","go","golang","mock","mocking","productivity","programming","test","testing","testing-tools","tests"],"created_at":"2025-03-28T02:37:40.860Z","updated_at":"2025-10-27T00:11:57.029Z","avatar_url":"https://github.com/tymonx.png","language":"Shell","readme":"# Docker Go\n\nA Docker image with preinstalled tools for developing, mocking, formatting, linting,\nbuilding, testing and documenting Go projects.\n\n## Features\n\n*   Pre-installed required tools for developing, mocking, formatting, linting, building, testing and documenting Go projects\n*   Pre-installed the `mockgen` tool for generating mocks for testing\n*   Formatting and validating Go source files imports with the `goimports` tool\n*   Formatting and validating Go source files format with the `gofmt` tool\n*   Formatting and validating Go source files line lengths with the `golines` tool\n*   Validating Go source files errors with the `errcheck` tool\n*   Linting Go source files with the `revive`, the `golangci-lint` and the `golint` tools\n*   Building Go source files\n*   Testing Go project\n*   Generating Go coverage result, text and HTML reports\n*   Generating JUnit test XML report for GitLab Merge Requests\n*   Generating Cobertura coverage XML report for GitLab Merge Requests\n*   Validating Go coverage value threshold with colorization\n*   Colorizing Go imports and format validation with the `colordiff` tool\n*   Colorizing Go tests with the `richgo` tool\n*   Colorizing Go coverage results and format nicely with the `column` tool\n*   Generating static HTML coverage report with the `go tool cover` tool\n\n## Example\n\n![Example](assets/images/example.png \"Example\")\n\n## Usage\n\nDownload the `docker-run.sh` helper script:\n\n```plaintext\nwget -O docker-run.sh https://gitlab.com/tymonx/docker-go/-/raw/master/docker-run.sh\n```\n\nMake it executable:\n\n```plaintext\nchmod a+x ./docker-run.sh\n```\n\nRun the `docker-run.sh` script without any arguments to work in Docker container:\n\n```plaintext\n./docker-run.sh\n```\n\nOr pass arguments to the `docker-run.sh` script to execute commands inside Docker container:\n\n```plaintext\n./docker-run.sh go build ./...\n```\n\nUse the `go-mock` command to create mocks for all automatically detected Go interfaces:\n\n```plaintext\n./docker-run.sh go-mock\n```\n\nUse the `go-format` command to automatically reformat Go source files:\n\n```plaintext\n./docker-run.sh go-format\n```\n\nUse the `go-lint` command to run various Go linters on Go source files with enabled colorization:\n\n```plaintext\n./docker-run.sh go-lint\n```\n\n:exclamation: Notice :exclamation:\n\nTo fix Go source code formatting errors from Go linter tools,\nuse the `./docker-run.sh go-format` script for that.\n\nUse the `go-build` command to build Go source files. Equivalent to the `go build ./...` execution:\n\n```plaintext\n./docker-run.sh go-build\n```\n\nUse the `go-test` command to run tests and validate coverage result with enabled colorization:\n\n```plaintext\n./docker-run.sh go-test\n```\n\nUse the `go-test-no-cover` command to run tests without coverage:\n\n```plaintext\n./docker-run.sh go-test-no-cover\n```\n\nTo run only a single test:\n\n```plaintext\n./docker-run.sh go-test -run \u003cTestName\u003e ./...\n```\n\nRunning only a single test without coverage:\n\n```plaintext\n./docker-run.sh go-test-no-cover -run \u003cTestName\u003e ./...\n```\n\nUse the `go-doc` command to run Go source code documentation server for your project on default `localhost:6060`:\n\n```plaintext\n./docker-run.sh go-doc\n```\n\n:exclamation: Notice :exclamation:\n\nIt can take some time before server will process all source code files for browsing.\nWait several seconds more and refresh your web browser.\n\nAll commands accept standard Go paths as additional arguments like `./`, `./...`, `./\u003cpath\u003e` and so on.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftymonx%2Fdocker-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftymonx%2Fdocker-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftymonx%2Fdocker-go/lists"}