diff --git a/.all-contributorsrc b/.all-contributorsrc new file mode 100644 index 0000000..07e37da --- /dev/null +++ b/.all-contributorsrc @@ -0,0 +1,24 @@ +{ + "files": [ + "README.md" + ], + "imageSize": 100, + "commit": false, + "contributors": [ + { + "login": "harakeishi", + "name": "原 慧士", + "avatar_url": "https://avatars.githubusercontent.com/u/44335168?v=4", + "profile": "https://yaserarenai.com", + "contributions": [ + "code" + ] + } + ], + "contributorsPerLine": 7, + "projectName": "curver", + "projectOwner": "harakeishi", + "repoType": "github", + "repoHost": "https://github.com", + "skipCi": true +} diff --git a/README.md b/README.md index 117f462..99600cc 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,13 @@ ![logo](logo.png) + +[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-) + [![GitHub release](https://img.shields.io/github/release/harakeishi/curver.svg)](https://github.com/harakeishi/curver/releases) [![Go Report Card](https://goreportcard.com/badge/github.com/harakeishi/curver)](https://goreportcard.com/report/github.com/harakeishi/curver) `curver` is a simple way to display the version of a CUI tool made with go. `curver` was named as an abbreviation for `current version`. -## Table of Contents +### Table of Contents - [Installation](#installation) - [Importing](#importing) - [Documentation](#documentation) @@ -13,27 +16,28 @@ - [use goreleaser](#use-goreleaser) - [If you only want the version](#if-you-only-want-the-version) - [License](#license) +- [Contributors ✨](#contributors-) -# Installation +## Installation ```bash go get github.com/harakeishi/curver ``` -# Importing +## Importing ```go import ( "github.com/harakeishi/curver" ) ``` -# Documentation +## Documentation Visit the docs on [GoDoc](https://pkg.go.dev/github.com/harakeishi/curver) -# usage +## usage If the value using ldflag is stored in the variable Version, that value will be displayed. Otherwise, it will display the build information embedded in the running binary. -## use go build +### use go build ```go // main.go package main @@ -63,7 +67,7 @@ If you want to embed the result of 'git tag', you can do the following ``` $ go build -ldflags "-X github.com/harakeishi/curver.Version=$(git describe --tags)" -o ./main ``` -## use goreleaser +### use goreleaser If you are using [goreleaser](https://goreleaser.com/) to do the release, do the following ```yml @@ -73,7 +77,7 @@ builds: ``` -## If you only want the version +### If you only want the version The following will return the version as a string. ```go @@ -89,6 +93,26 @@ func main () { } ``` -# License +## License Copyright (c) 2022 harakeishi Licensed under [MIT](LICENSE) + +## Contributors ✨ + +Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): + + + + + + + + +

原 慧士

💻
+ + + + + + +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! \ No newline at end of file