An open API service indexing awesome lists of open source software.

https://github.com/svengreb/golib

A core library of Go packages
https://github.com/svengreb/golib

common-library core go golang hacktoberfest library packages shared-library utilities

Last synced: 10 months ago
JSON representation

A core library of Go packages

Awesome Lists containing this project

README

          

A core library of Go packages

_golib_ is a [collection of Go packages][go-doc-mod] that provide various helpful functions and types for many common use cases. It is designed with and for projects that follow the [DRY][wikip-dry], [KISS][wikip-kiss_prin] and/or [Unix][wikip-unix_phil] principles to improve the [reuse of code][wikip-code_reuse] while reducing [“Copy-and-paste programming“][wikip-cp_prog] and [duplicated code][wikip-dup_code] as much as possible. The packages are created to be flexible for universal usage and composition for different use cases and environments.

Please always keep in mind that _golib_ was mainly created for usage in my open source and personal projects!
Even though this module follows the [_SemVer_ 2.0.0 specification][semver-spec-v2.0.0] and development of the provided packages take stability and backwards compatibility into account, there might be (possibly breaking) changes, at least while this module in [_SemVer_ major version zero][semver#major_ver_zero].
Also note that packages might be extracted into own modules if the scope exceeds the goal of _golib_. Such changes will be communicated by raising the [Go module major version][go-docs-mod#versions].
Most packages are independent from each other and strive to depend on as few external packages as possible, but ensure that you're aware of the internal structure of the packages you're using.

## Overview

This is an rough overview of the packages included in this module. Please refer to the individual package documentations for more details.

- [pkg/io/fs][go-pkg-pkg/io/fs] — provides I/O utility functions for filesystem interactions. Please note that it makes use of the underlying filesystem and only serves as additional utility for the [os][go-docs-pkg-os] Go standard library package.
For more advanced and extended features see packages like [github.com/spf13/afero][go-pkg-github.com/spf13/afero] instead.
- [pkg/io/fs/filepath][go-pkg-pkg/io/fs/filepath] — provides utility functions for manipulating filename paths for the target operating system-defined file paths, using either forward slashes or backslashes. It extends the [path/filepath][go-docs-pkg-path/filepath] Go standard library package with more utilities.
Please note that some functions interact with the underlying filesystem through on-disk operations.
- [pkg/vcs][go-pkg-pkg/vcs] — provides packages and utility functions to interact with [version control systems][wikip-vcs].
- [pkg/vcs/git][go-pkg-pkg/vcs/git] — provides VCS utility functions to interact with [Git][] repositories.

## Contributing

_golib_ is an open source project and contributions are always welcome!

There are many ways to contribute, from [writing- and improving documentation and tutorials][contrib-guide-docs], [reporting bugs][contrib-guide-bugs], [submitting enhancement suggestions][contrib-guide-enhance] that can be added to _golib_ by [submitting pull requests][contrib-guide-pr].

Please take a moment to read the [contributing guide][contrib-guide] to learn about the development process, the [styleguides][contrib-guide-styles] to which this project adheres as well as the [branch organization][contrib-guide-branching] and [versioning][contrib-guide-versioning] model.

The guide also includes information about [minimal, complete, and verifiable examples][contrib-guide-mcve] and other ways to contribute to the project like [improving existing issues][contrib-guide-impr-issues] and [giving feedback on issues and pull requests][contrib-guide-feedback].

Copyright © 2020-present Sven Greb

[contrib-guide-branching]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md#branch-organization
[contrib-guide-bugs]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md#bug-reports
[contrib-guide-docs]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md#documentations
[contrib-guide-enhance]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md#enhancement-suggestions
[contrib-guide-feedback]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md#give-feedback-on-issues-and-pull-requests
[contrib-guide-impr-issues]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md#improve-issues
[contrib-guide-mcve]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md#mcve
[contrib-guide-pr]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md#pull-requests
[contrib-guide-styles]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md#style-guides
[contrib-guide-versioning]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md#versioning
[contrib-guide]: https://github.com/svengreb/golib/blob/main/CONTRIBUTING.md
[git]: https://git-scm.com
[go-doc-mod]: https://golang.org/ref/mod
[go-docs-mod#versions]: https://golang.org/ref/mod#versions
[go-docs-pkg-os]: https://golang.org/pkg/os
[go-docs-pkg-path/filepath]: https://golang.org/pkg/path/filepath
[go-pkg-github.com/spf13/afero]: https://pkg.go.dev/github.com/spf13/afero
[go-pkg-pkg/io/fs]: https://pkg.go.dev/github.com/svengreb/golib/pkg/io/fs
[go-pkg-pkg/io/fs/filepath]: https://pkg.go.dev/github.com/svengreb/golib/pkg/io/fs/filepath
[go-pkg-pkg/vcs]: https://pkg.go.dev/github.com/svengreb/golib/pkg/vcs
[go-pkg-pkg/vcs/git]: https://pkg.go.dev/github.com/svengreb/golib/pkg/vcs/git
[semver-spec-v2.0.0]: https://semver.org/spec/v2.0.0.html
[semver#major_ver_zero]: https://semver.org/#spec-item-4
[wikip-code_reuse]: https://en.wikipedia.org/wiki/Code_reuse
[wikip-cp_prog]: https://en.wikipedia.org/wiki/Copy-and-paste_programming
[wikip-dry]: https://en.wikipedia.org/wiki/Don%27t_repeat_yourself
[wikip-dup_code]: https://en.wikipedia.org/wiki/Duplicate_code
[wikip-kiss_prin]: https://en.wikipedia.org/wiki/KISS_principle
[wikip-unix_phil]: https://en.wikipedia.org/wiki/Unix_philosophy
[wikip-vcs]: https://en.wikipedia.org/wiki/Version_control