Skip to content

Commit

Permalink
Resolve issue#12 (#13)
Browse files Browse the repository at this point in the history
Clarify project purpose in README

* Update godoc link to point to v2 version.
* Add more sub-sections explaining project purpose.
* Add sub-sections for installation and usage.

Closes #12
  • Loading branch information
rsjethani authored Jan 13, 2022
1 parent 216cec5 commit 335320a
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
[![Coverage](https://gocover.io/_badge/github.com/rsjethani/secret)](https://gocover.io/github.com/rsjethani/secret) [![GoDoc reference example](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/rsjethani/secret)
# secret - Prevent your secrets from leaking into logs and std*
The package provides the type `Secret` for storing passwords and credentials. Using this type allows the actual secret string to be automatically redacted from printing and marshaling processes. See Go docs for example usage.
[![Coverage](https://gocover.io/_badge/github.com/rsjethani/secret)](https://gocover.io/github.com/rsjethani/secret) [![GoDoc reference example](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/rsjethani/secret/v2)
# secret v2

### What secret is?
- It provides simple Go types like [secret.Text](https://pkg.go.dev/github.com/rsjethani/secret/v2#Text) to encapsulate your secret.
- The encapsulated secret remains inaccessible to operations like printing, logging, and JSON serializtion, a redact hint like `*****` is returned instead.
- The only way to access the actual secret value is by asking explicitly via the `.Value()` method.

### What secret is not?
- It is not a secret management service or your local password manager.
- It is not a Go client to facilitate communication with secret managers like Hashicorp Vault, AWS secret Manager etc. Checkout [teller](https://github.com/spectralops/teller) if that is what you are looking for.

### Installation
```
go get github.com/rsjethani/secret/v2
```
NOTE: v1 is deprectated now.

### Usage
See godoc reference for usage examples.

0 comments on commit 335320a

Please sign in to comment.