pkg/

directory
v1.0.3-beta002 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2022 License: MIT

README

/pkg

Library code that's ok to use by external applications (e.g., /pkg/mypubliclib). Other projects will import these libraries expecting them to work, so think twice before you put something here :-) Note that the internal directory is a better way to ensure your private packages are not importable because it's enforced by Go. The /pkg directory is still a good way to explicitly communicate that the code in that directory is safe for use by others. The I'll take pkg over internal blog post by Travis Jeffery provides a good overview of the pkg and internal directories and when it might make sense to use them.

It's also a way to group Go code in one place when your root directory contains lots of non-Go components and directories making it easier to run various Go tools (as mentioned in these talks: Best Practices for Industrial Programming from GopherCon EU 2018, GopherCon 2018: Kat Zien - How Do You Structure Your Go Apps and GoLab 2018 - Massimiliano Pippi - Project layout patterns in Go).

Note that this is not a universally accepted pattern and for every popular repo that uses it you can find 10 that don't. It's up to you to decide if you want to use this pattern or not. Regardless of whether or not it's a good pattern more people will know what you mean than not. It might a bit confusing for some of the new Go devs, but it's a pretty simple confusion to resolve and that's one of the goals for this project layout repo.

Ok not to use it if your app project is really small and where an extra level of nesting doesn't add much value (unless you really want to). Think about it when it's getting big enough and your root directory gets pretty busy (especially if you have a lot of non-Go app components).

The pkg directory origins: The old Go source code used to use pkg for its packages and then various Go projects in the community started copying the pattern (see this Brad Fitzpatrick's tweet for more context).

Examples:

Directories

Path Synopsis
api
v1/testkube
* Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.5 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.5 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.1 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) content could be fetched as file or dir (many files, e.g.
* Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.5 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.5 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * testkube * * Efficient testing of k8s applications mandates a k8s native approach to test mgmt/definition/execution - testkube provides a “quality control plane” that natively integrates testing activities into k8s development and operational workflows * * API version: 0.0.1 * Contact: api@testkube.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Testkube API * * Testkube provides a Kubernetes-native framework for test definition, execution and results * * API version: 1.0.0 * Contact: testkube@kubeshop.io * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) content could be fetched as file or dir (many files, e.g.
output
TODO will be moved to testkube lib when completed
TODO will be moved to testkube lib when completed
TODO consider checkout by some go-git library to limit external deps in docker container in time writing code "github.com/src-d/go-git" didn't have any filter options "github.com/go-git/go-git/v5" also
TODO consider checkout by some go-git library to limit external deps in docker container in time writing code "github.com/src-d/go-git" didn't have any filter options "github.com/go-git/go-git/v5" also
mapper
test
simple ui - TODO use something more sophisticated :)
simple ui - TODO use something more sophisticated :)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL