Code Monkey home page Code Monkey logo

Comments (1)

kcq avatar kcq commented on June 19, 2024

It depends... Whenever you have something with the main package, even if it's not an app you ship, putting it under cmd is ok. Kubernetes is kind of like that: https://github.com/kubernetes/kubernetes/tree/master/cmd

A lot of times the external/3rd party code generators or other code related tools (e.g., linters) go into the tools directory where they get pulled in as dependencies (which is an enhanced version of what's described here https://www.jvt.me/posts/2022/06/15/go-tools-dependency-management/ and here https://marcofranssen.nl/manage-go-tools-via-go-modules ):

Here are a few examples of that:

https://github.com/cilium/cilium/blob/main/tools/tools.go
https://github.com/dapr/dapr/blob/master/tools/tools.go
https://github.com/buildpacks/pack/blob/main/tools/tools.go

Sometimes the tools directory does include custom code too. Here's an example: https://github.com/influxdata/influxdb/blob/master/tools/tmpl/main.go

And sometimes the tools directory has a bunch of supporting components that are all over the place like Istio, for example: https://github.com/istio/istio/tree/master/tools

from project-layout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.