https://github.com/kubecub/go-project-layout

🔮 A canonical Go project structure and layout for generating scaffolding projects.

https://github.com/kubecub/go-project-layout

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.6%) to scientific vocabulary

Keywords from Contributors

kubecub actions cicd labels robot gpt-4 learning makefile cncf glog
Last synced: 4 months ago · JSON representation

Repository

🔮 A canonical Go project structure and layout for generating scaffolding projects.

Basic Info
  • Host: GitHub
  • Owner: kubecub
  • License: mit
  • Language: Makefile
  • Default Branch: main
  • Homepage:
  • Size: 165 KB
Statistics
  • Stars: 16
  • Watchers: 1
  • Forks: 1
  • Open Issues: 2
  • Releases: 0
Created almost 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing Funding License Code of conduct Codeowners Security

README.md

go-project-layout

⭐️ Template for a typical module written on Go ⭐️

A+ good first

English中文


🧩 Awesome features

At Github, we want to start new projects faster using best practices with a predefined structure and focusing on core ideas implementation rather than wasting time on environment configuration and copying boilerplate code.

I defined a spec template that I could use to quickly start building a full-fledged project.

In each directory, there is a README.md and an OWNERS, which explains what the directory does and who owns it.

Labels denger: Read about the go-project-layout tag design. We have provided in the github-label-syncer warehouse label synchronizer.

🛫 Quick start

Note: You can get started quickly with go-project-layout.

  1. Generate a new repository from the template.
  2. Clone the repository locally.
  3. Update files, read the README files in each directory.
  4. Write your code and tests.
Work with Makefile ```bash ❯ make help # show help ❯ make build # build binary ```
Git hook(push & commit) ```bash ❯ make # To trigger the hook script, move to.git ❯ tree .git/hooks .git/hooks ├── applypatch-msg.sample ├── commit-msg ├── commit-msg.sample ├── fsmonitor-watchman.sample ├── post-update.sample ├── pre-applypatch.sample ├── pre-commit ├── pre-commit.sample ├── pre-merge-commit.sample ├── pre-push ├── pre-push.sample ├── pre-rebase.sample ├── pre-receive.sample ├── prepare-commit-msg.sample ├── push-to-checkout.sample └── update.sample ❯ cp ../sealer/_output/bin/sealer/linux_amd64/sealer ./ # add big binary file ❯ git add . ❯ git commit -a -s -m "nono" # Excess commit blocking kubecub : Running local kubecub pre-commit hook. kubecub : File sealer is 71 MB, which is larger than our configured limit of 2 MB kubecub : If you really need to commit this file, you can override the size limit by setting the GIT_FILE_SIZE_LIMIT environment variable, e.g. GIT_FILE_SIZE_LIMIT=42000000 for 42MB. Or, commit with the --no-verify switch to skip the check entirely. kubecub : Commit aborted ❯ rm -rf .git # remote big binary ❯ git commit -a -s -m "nono" # Bad commit blocking kubecub : Running local kubecub pre-commit hook. kubecub : Running the kubecub commit-msg hook. fakehsh: subject does not match regex [^(build|chore|ci|docs|feat|feature|fix|perf|refactor|revert|style|test)(.*)?:\s?.*] fakehsh: subject length less than min [10] kubecub : Please fix your commit message to match kubecub coding standards kubecub : https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md ❯ git commit -a -s -m "docs(main): README-en Chinese documentation" kubecub : Running local kubecub pre-commit hook. kubecub : Running the kubecub commit-msg hook. [main b3b339f] docs(main): README-en Chinese documentation 1 file changed, 29 insertions(+) ❯ git push origin main ```
Work with actions Actions provide handling of PR and issue. We used the bot [🚀@kubbot](https://github.com/kubbot), It can detect issues in Chinese and translate them to English, and you can interact with it using the command `/comment`. Comment in an issue: ```bash ❯ /intive ```
Work with Tools ```bash ❯ make tools ```
Work with Docker ```bash ❯ make deploy ```

🕋 architecture diagram

go // architecture diagram

MVC Architecture Design: go // MVC Architecture Design

🤖 File Directory Description

Catalog standardization design structure:

bash .go-project-layout ├── CONTRIBUTING.md # Contribution guidelines ├── LICENSE # License information ├── Makefile # Makefile for building and running the project ├── README.md # Project overview in English ├── README_zh-CN.md # Project overview in Chinese ├── api # API-related files │ ├── OWNERS # API owners │ └── README.md # API documentation ├── assets # Static assets, such as images and stylesheets │ └── README.md # Assets documentation ├── build # Build-related files │ ├── OWNERS # Build owners │ └── README.md # Build documentation ├── cmd # Command-line tools and entry points │ ├── OWNERS # Command owners │ └── README.md # Command documentation ├── configs # Configuration files │ ├── OWNERS # Configuration owners │ ├── README.md # Configuration documentation │ └── config.yaml # Main configuration file ├── deploy # Deployment-related files │ ├── OWNERS # Deployment owners │ └── README.md # Deployment documentation ├── docs # Project documentation │ ├── OWNERS # Documentation owners │ └── README.md # Documentation index ├── examples # Example code and usage │ ├── OWNERS # Example owners │ └── README.md # Example documentation ├── init # Initialization files │ ├── OWNERS # Initialization owners │ └── README.md # Initialization documentation ├── internal # Internal application code │ ├── OWNERS # Internal code owners │ ├── README.md # Internal code documentation │ ├── app # Application logic │ ├── pkg # Internal packages │ └── utils # Utility functions and helpers ├── pkg # Public packages and libraries │ ├── OWNERS # Package owners │ ├── README.md # Package documentation │ ├── common # Common utilities and helpers │ ├── log # Log utilities │ ├── tools # Tooling and scripts │ ├── utils # General utility functions │ └── version # Version information ├── scripts # Scripts for development and automation │ ├── LICENSE_TEMPLATES # License templates │ ├── OWNERS # Script owners │ ├── README.md # Script documentation │ ├── githooks # Git hooks for development │ └── make-rules # Makefile rules and scripts ├── test # Test files and test-related utilities │ ├── OWNERS # Test owners │ └── README.md # Test documentation ├── third_party # Third-party dependencies and libraries │ └── README.md # Third-party documentation ├── tools # Tooling and utilities for development │ └── README.md # Tool documentation └── web # Web-related files, such as HTML and CSS ├── OWNERS # Web owners └── README.md # Web documentation

🗓️ community meeting

We welcome everyone to join us and contribute to go-project-layout, whether you are new to open source or professional. We are committed to promoting an open source culture, so we offer community members neighborhood prizes and reward money in recognition of their contributions. We believe that by working together, we can build a strong community and make valuable open source tools and resources available to more people. So if you are interested in go-project-layout, please join our community and start contributing your ideas and skills!

We take notes of each biweekly meeting in GitHub discussions, and our minutes are written in Google Docs.

go-project-layout maintains a public roadmap. It gives a a high-level view of the main priorities for the project, the maturity of different features and projects, and how to influence the project direction.

🤼‍ Contributing & Development

kubecub Our goal is to build a top-level open source community. We have a set of standards, in the Community repository.

If you'd like to contribute to this go-project-layout repository, please read our contributor documentation.

Before you start, please make sure your changes are in demand. The best for that is to create a new discussion OR Slack Communication, or if you find an issue, report it first.

🚨 License

Kubecub is licensed under the MIT License. See LICENSE for the full license text.

FOSSA Status

🔮 Thanks to our contributors!

Owner

  • Name: Kubernetes Cub community
  • Login: kubecub
  • Kind: organization
  • Email: cub@nsddd.top
  • Location: China

c-ub is a learning community for all, where you can find blockchain, operating systems, cloud-native projects, and a wide variety of resources and notebooks

GitHub Events

Total
  • Watch event: 7
  • Push event: 4
  • Pull request event: 1
  • Fork event: 2
Last Year
  • Watch event: 7
  • Push event: 4
  • Pull request event: 1
  • Fork event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 97
  • Total Committers: 5
  • Avg Commits per committer: 19.4
  • Development Distribution Score (DDS): 0.278
Past Year
  • Commits: 97
  • Committers: 5
  • Avg Commits per committer: 19.4
  • Development Distribution Score (DDS): 0.278
Top Committers
Name Email Commits
Xinwei Xiong(cubxxw-openim) 3****s@g****m 70
sweep-ai[bot] 1****] 15
Xinwei Xiong 8****w 10
Xinwei Xiong 3****S@g****m 1
I am a robot by @cubxxw 1****t 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 86
  • Total pull requests: 5
  • Average time to close issues: 28 days
  • Average time to close pull requests: 25 minutes
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 3.52
  • Average comments per pull request: 7.8
  • Merged pull requests: 4
  • Bot issues: 0
  • Bot pull requests: 3
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • kubbot (77)
  • cubxxw (1)
Pull Request Authors
  • cubxxw (2)
  • sweep-ai[bot] (2)
  • dependabot[bot] (1)
Top Labels
Issue Labels
kind/documentation (74) triage/unresolved (74) report (74) lifecycle/stale (60) triage/accepted (12) good first issue (5) help wanted (1) kind/feature (1)
Pull Request Labels
size/M (2) size/XS (1) dependencies (1) github_actions (1)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
proxy.golang.org: github.com/kubecub/go-project-layout
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 8.9%
Dependent repos count: 10.6%
Stargazers count: 12.6%
Average: 12.8%
Forks count: 19.1%
Last synced: 6 months ago