Skip to content

Commit

Permalink
Updated readme and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed May 10, 2020
1 parent 7336a12 commit 9128545
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 14 deletions.
33 changes: 25 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
## Default Repo Domain
GIT_DOMAIN=github.com
## Default repository domain name
ifndef GIT_DOMAIN
override GIT_DOMAIN=github.com
endif

## Do we have git available?
HAS_GIT := $(shell command -v git 2> /dev/null)

## Automatically detect the repo owner and repo name
REPO_NAME=$(shell basename `git rev-parse --show-toplevel`)
REPO_OWNER=$(shell git config --get remote.origin.url | sed 's/git@$(GIT_DOMAIN)://g' | sed 's/\/$(REPO_NAME).git//g')
ifdef HAS_GIT
## Automatically detect the repo owner and repo name (for local use with Git)
REPO_NAME=$(shell basename `git rev-parse --show-toplevel`)
REPO_OWNER=$(shell git config --get remote.origin.url | sed 's/git@$(GIT_DOMAIN)://g' | sed 's/\/$(REPO_NAME).git//g')

## Set the version (for go docs)
VERSION_SHORT=$(shell git describe --tags --always --abbrev=0)
endif

## Set the version (for go docs)
VERSION_SHORT=$(shell git describe --tags --always --abbrev=0)
## Not defined? Use default repo name which is the application
ifeq ($(REPO_NAME),)
REPO_NAME="paymail-inspector"
endif

## Not defined? Use default repo owner
ifeq ($(REPO_OWNER),)
REPO_OWNER="mrz1836"
endif

## Set the distribution folder
ifndef DISTRIBUTIONS_DIR
override DISTRIBUTIONS_DIR=./dist
override DISTRIBUTIONS_DIR=./dist
endif

.PHONY: test lint clean release
Expand Down
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# go-sanitize
> Simple library of sanitation methods for data sanitation and reduction
[![Go](https://img.shields.io/github/go-mod/go-version/mrz1836/go-sanitize)](https://golang.org/)
[![Release](https://img.shields.io/github/release-pre/mrz1836/go-sanitize.svg?logo=github&style=flat)](https://github.com/mrz1836/go-sanitize/releases)
[![Build Status](https://travis-ci.com/mrz1836/go-sanitize.svg?branch=master)](https://travis-ci.com/mrz1836/go-sanitize)
[![Report](https://goreportcard.com/badge/github.com/mrz1836/go-sanitize?style=flat)](https://goreportcard.com/report/github.com/mrz1836/go-sanitize)
[![codecov](https://codecov.io/gh/mrz1836/go-sanitize/branch/master/graph/badge.svg)](https://codecov.io/gh/mrz1836/go-sanitize)
[![Release](https://img.shields.io/github/release-pre/mrz1836/go-sanitize.svg?style=flat)](https://github.com/mrz1836/go-sanitize/releases)
[![Go](https://img.shields.io/github/go-mod/go-version/mrz1836/go-sanitize)](https://golang.org/)
[![GoDoc](https://godoc.org/github.com/mrz1836/go-sanitize?status.svg&style=flat)](https://pkg.go.dev/github.com/mrz1836/go-sanitize?tab=doc)
[![Sponsor](https://img.shields.io/badge/sponsor-MrZ-181717.svg?logo=github&style=flat&v=3)](https://github.com/sponsors/mrz1836)
[![Donate](https://img.shields.io/badge/donate-bitcoin-ff9900.svg?logo=bitcoin&style=flat)](https://mrz1818.com/?tab=tips&af=go-sanitize)

<br/>

## Table of Contents
- [Installation](#installation)
Expand All @@ -19,13 +23,17 @@
- [Contributing](#contributing)
- [License](#license)

<br/>

## Installation

**go-sanitize** requires a [supported release of Go](https://golang.org/doc/devel/release.html#policy).
```shell script
go get -u github.com/mrz1836/go-sanitize
```

<br/>

## Documentation
You can view the generated [documentation here](https://pkg.go.dev/github.com/mrz1836/go-sanitize?tab=doc).

Expand Down Expand Up @@ -71,6 +79,8 @@ vet Run the Go vet application
```
</details>

<br/>

## Examples & Tests
All unit tests and [examples](sanitize_test.go) run via [Travis CI](https://travis-ci.org/mrz1836/go-sanitize) and uses [Go version 1.14.x](https://golang.org/doc/go1.14). View the [deployment configuration file](.travis.yml).

Expand All @@ -79,15 +89,21 @@ Run all tests (including integration tests)
make test
```

<br/>

## Benchmarks
Run the Go [benchmarks](sanitize_test.go):
```shell script
make bench
```

<br/>

## Code Standards
Read more about this Go project's [code standards](CODE_STANDARDS.md).

<br/>

## Usage
- View the [examples](sanitize_test.go)
- View the [benchmarks](sanitize_test.go)
Expand All @@ -112,19 +128,26 @@ func main() {
}
```

<br/>

## Maintainers

| [<img src="https://github.com/mrz1836.png" height="50" alt="MrZ" />](https://github.com/mrz1836) |
|:---:|
| [MrZ](https://github.com/mrz1836) |

## Contributing
<br/>

View the [contributing guidelines](CONTRIBUTING.md) and follow the [code of conduct](CODE_OF_CONDUCT.md).
## Contributing
View the [contributing guidelines](CONTRIBUTING.md) and please follow the [code of conduct](CODE_OF_CONDUCT.md).

Support the development of this project 🙏
### How can I help?
All kinds of contributions are welcome :raised_hands:!
The most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:.
You can also support this project by [becoming a sponsor on GitHub](https://github.com/sponsors/mrz1836) :clap:
or by making a [**bitcoin donation**](https://mrz1818.com/?tab=tips&af=go-sanitize) to ensure this journey continues indefinitely! :rocket:

[![Donate](https://img.shields.io/badge/donate-bitcoin-brightgreen.svg)](https://mrz1818.com/?tab=tips&af=go-sanitize)
<br/>

## License

Expand Down

0 comments on commit 9128545

Please sign in to comment.