Skip to content

OscarAyoy/base64url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

base64url

Command-line base64url encoder / decoder

Installation

$ go get -u github.com/oscarayoy/base64url

Usage

$ base64url -h
Usage of base64url:
  -d	decodes input (default is to encode)
  -i string
    	input file or "-" for stdin (default "-")
  -o string
    	output file or "-" for stdout (default "-")

Encode from stdin:

$ echo "Hello, world" | base64url
SGVsbG8sIHdvcmxkCg

Decode from stdin:

$ echo "SGVsbG8sIHdvcmxkCg" | base64url -d
Hello, world

Encode to and from file:

$ base64url -i plain.txt -o b64.txt

Decode to and from file:

$ base64url -d -i b64.txt -o plain.txt

Development Setup

Install Goimports

This is used for code formatting.

$ go get -u golang.org/x/tools/cmd/goimports

Install Golint

This is used for code linting.

$ go get -u golang.org/x/lint/golint

Enable Commit Signing

The repository has been configured to enforce signature verification.

$ git config commit.gpgsign true
$ git config alias.tag 'tag -s'

Set Up the Git Pre-Commit Hook

This pre-commit hook makes sure all code is properly formatted and linted before it is committed.

$ cp githooks/pre-commit .git/hooks/pre-commit

Install goimports, golint and go vet support in your editor of choice as needed.

About

Command-line base64url encoder / decoder

Resources

License

Stars

Watchers

Forks

Packages

No packages published