From fe3aa4748c0cdba839e60fe319c34fcb74a39020 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 26 Aug 2021 12:03:39 +0200 Subject: [PATCH] various docs touch-ups - add language hints to examples to enable highlighting on GitHub. - remove "binary release" instructions, because current releases have not released binaries. - updated `go install` instructions for go modules (add `@latest`). - fixed link to original github repository. Signed-off-by: Sebastiaan van Stijn --- README.md | 6 +++--- bin/crypt/README.md | 22 +++++++--------------- config/README.md | 4 ++-- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index c4de779e..293529ba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # crypt -**This is a maintained fork of the abandoned [original](https://github.com/bketelsen/crypt)** +**This is a maintained fork of the abandoned [original](https://github.com/xordataexchange/crypt)** You can use crypt as a command line tool or as a configuration library: @@ -19,7 +19,7 @@ The crypt cli and config package require gpg keyrings. ### Create a key and keyring from a batch file -``` +```bash vim app.batch ``` @@ -39,7 +39,7 @@ Expire-Date: 0 Run the following command: -``` +```bash gpg2 --batch --armor --gen-key app.batch ``` diff --git a/bin/crypt/README.md b/bin/crypt/README.md index c8ada56a..64cc9edf 100644 --- a/bin/crypt/README.md +++ b/bin/crypt/README.md @@ -2,18 +2,8 @@ ## Install -### Binary release - -``` -wget https://github.com/bketelsen/crypt/releases/download/v0.0.1/crypt-0.0.1-linux-amd64 -mv crypt-0.0.1-linux-amd64 /usr/local/bin/crypt -chmod +x /usr/local/bin/crypt -``` - -### go install - -``` -go install github.com/bketelsen/crypt/bin/crypt +```bash +go install github.com/bketelsen/crypt/bin/crypt@latest ``` ## Backends @@ -41,7 +31,7 @@ usage: crypt set [args...] key file Example: -``` +```bash crypt set -keyring pubring.gpg /app/config config.json ``` @@ -56,15 +46,17 @@ usage: crypt get [args...] key Example: -``` +```bash crypt get -secret-keyring secring.gpg /app/config ``` ### Support for unencrypted values -``` + +```bash crypt set -plaintext ... crypt get -plaintext ... ``` + Crypt now has support for getting and setting plain unencrypted values, as a convenience. This was added to the backend libraries so it could be exposed in spf13/viper. Use the -plaintext flag to get or set a value without encryption. diff --git a/config/README.md b/config/README.md index 511fd7f1..f2a5b491 100644 --- a/config/README.md +++ b/config/README.md @@ -4,7 +4,7 @@ ### Get configuration from a backend -``` +```go package main import ( @@ -41,7 +41,7 @@ func main() { ### Monitor backend for configuration changes -``` +```go package main import (