feat: scaffold Go project with cobra CLI, Makefile, and config

Set up the Go module, directory structure, and minimal CLI entrypoint
for the awesome-docker Go rewrite. Includes:
- cobra-based CLI with version command
- Makefile with build/test/lint/check/health/report/clean targets
- config/exclude.yaml migrated from tests/exclude_in_test.json
- config/website.tmpl.html copied from website/index.tmpl.html
- .gitignore updated for Go binary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julien Bisconti
2026-02-27 19:03:06 +01:00
parent bae26ccdb1
commit 08da394e71
7 changed files with 316 additions and 0 deletions

3
.gitignore vendored
View File

@@ -11,3 +11,6 @@ website/table.html
.idea
**/.DS_Store
.worktrees
# Go
/awesome-docker

23
Makefile Normal file
View File

@@ -0,0 +1,23 @@
BINARY := awesome-docker
.PHONY: build test lint check health report clean
build:
go build -o $(BINARY) ./cmd/awesome-docker
test:
go test ./internal/... -v
lint: build
./$(BINARY) lint
check: build
./$(BINARY) check
health: build
./$(BINARY) health
report: build
./$(BINARY) report
clean:
rm -f $(BINARY)

View File

@@ -0,0 +1,23 @@
package main
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
func main() {
root := &cobra.Command{
Use: "awesome-docker",
Short: "Quality tooling for the awesome-docker curated list",
}
root.AddCommand(
&cobra.Command{Use: "version", Short: "Print version", Run: func(cmd *cobra.Command, args []string) {
fmt.Println("awesome-docker v0.1.0")
}},
)
if err := root.Execute(); err != nil {
os.Exit(1)
}
}

18
config/exclude.yaml Normal file
View File

@@ -0,0 +1,18 @@
# URLs or URL prefixes to skip during link checking.
# These are known false positives or rate-limited domains.
domains:
- https://vimeo.com
- https://travis-ci.org/veggiemonk/awesome-docker.svg
- https://github.com/apps/
- https://twitter.com
- https://www.meetup.com/
- https://cycle.io/
- https://www.manning.com/
- https://deepfence.io
- https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg
- https://www.se-radio.net/2017/05/se-radio-episode-290-diogo-monica-on-docker-security
- https://www.reddit.com/r/docker/
- https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615
- https://www.youtube.com/playlist
- https://www.aquasec.com
- https://cloudsmith.com

229
config/website.tmpl.html Normal file
View File

@@ -0,0 +1,229 @@
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Cache-control" content="public" />
<meta charset="UTF-8" />
<title>Awesome-docker</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#5DBCD2" />
<meta
name="description"
content="A curated list of Docker resources and projects."
/>
<meta
name="keywords"
content="free and open-source open source projects for docker moby kubernetes linux awesome awesome-list container tools dockerfile list moby docker-container docker-image docker-environment docker-deployment docker-swarm docker-api docker-monitoring docker-machine docker-security docker-registry"
/>
<meta
name="google-site-verification"
content="_yiugvz0gCtfsBLyLl1LnkALXb6D4ofiwCyV1XOlYBM"
/>
<link rel="icon" type="image/png" href="favicon.png" />
<style>
* {
box-sizing: border-box;
}
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
padding: 0;
margin: 0;
font-family: Open Sans, Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
color: #606c71;
}
section {
display: block;
}
a {
background-color: transparent;
color: #5dbcd2;
text-decoration: none;
}
strong {
font-weight: 700;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
.btn {
display: inline-block;
margin-bottom: 1rem;
color: hsla(0, 0%, 100%, 0.7);
background-color: hsla(0, 0%, 100%, 0.08);
border: 1px solid hsla(0, 0%, 100%, 0.2);
border-radius: 0.3rem;
}
.page-header {
color: #fff;
text-align: center;
background-color: #5dbcd2;
background-image: linear-gradient(120deg, #155799, #5dbcd2);
}
.project-name {
margin-top: 0;
margin-bottom: 0.1rem;
}
.project-tagline {
margin-bottom: 2rem;
font-weight: 400;
opacity: 0.7;
}
.main-content {
word-wrap: break-word;
}
.main-content :first-child {
margin-top: 0;
}
.main-content h1,
.main-content h4 {
margin-top: 2rem;
margin-bottom: 1rem;
font-weight: 400;
color: #5dbcd2;
}
.main-content p {
margin-bottom: 1em;
}
.main-content blockquote {
padding: 0 1rem;
margin-left: 0;
color: #819198;
border-left: 0.3rem solid #dce6f0;
}
.main-content blockquote > :first-child {
margin-top: 0;
}
.main-content blockquote > :last-child {
margin-bottom: 0;
}
.main-content img {
max-width: 100%;
}
@media screen and (min-width: 64em) {
.btn {
padding: 0.75rem 1rem;
}
.page-header {
padding: 5rem 6rem;
}
.project-name {
font-size: 3.25rem;
}
.project-tagline {
font-size: 1.25rem;
}
.main-content {
max-width: 64rem;
padding: 2rem 6rem;
margin: 0 auto;
font-size: 1.1rem;
}
}
@media screen and (min-width: 42em) and (max-width: 64em) {
.btn {
padding: 0.6rem 0.9rem;
font-size: 0.9rem;
}
.page-header {
padding: 3rem 4rem;
}
.project-name {
font-size: 2.25rem;
}
.project-tagline {
font-size: 1.15rem;
}
.main-content {
padding: 2rem 4rem;
font-size: 1.1rem;
}
}
@media screen and (max-width: 42em) {
.btn {
display: block;
width: 100%;
padding: 0.75rem;
font-size: 0.9rem;
}
.page-header {
padding: 2rem 1rem;
}
.project-name {
font-size: 1.75rem;
}
.project-tagline {
font-size: 1rem;
}
.main-content {
padding: 2rem 1rem;
font-size: 1rem;
}
}
</style>
</head>
<body>
<section class="page-header">
<h1 class="project-name">Awesome-docker</h1>
<h2 class="project-tagline">
A curated list of Docker resources and projects
</h2>
<a href="https://github.com/veggiemonk/awesome-docker" class="btn"
>View on GitHub</a
>
<br />
<!-- Place this tag where you want the button to render. -->
<a
class="github-button"
href="https://github.com/veggiemonk/awesome-docker#readme"
data-icon="octicon-star"
data-size="large"
data-count-href="/veggiemonk/awesome-docker/stargazers"
data-show-count="true"
data-count-aria-label="# stargazers on GitHub"
aria-label="Star veggiemonk/awesome-docker on GitHub"
>Star</a
>
</section>
<section id="md" class="main-content"></section>
<!--<script src="index.js"></script> -->
<!--Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>

10
go.mod Normal file
View File

@@ -0,0 +1,10 @@
module github.com/veggiemonk/awesome-docker
go 1.25.0
require github.com/spf13/cobra v1.10.2
require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/spf13/pflag v1.0.9 // indirect
)

10
go.sum Normal file
View File

@@ -0,0 +1,10 @@
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU=
github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4=
github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY=
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=