-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Standard features like pwgen - Create LICENSE - Add goroutines, optimize duplicated naming for CLI options - Create content & GitAction badge for README - Create go.yml
- Loading branch information
Showing
5 changed files
with
492 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.13 | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
if [ -f Gopkg.toml ]; then | ||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
dep ensure | ||
fi | ||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 ѵµσɳɠ | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# pwgen-go | ||
Password generator practice in Go. It is inspired by https://github.com/jbernard/pwgen | ||
|
||
![Go](https://github.com/vuon9/pwgen-go/workflows/Go/badge.svg) | ||
|
||
## The manual | ||
|
||
This is following pwgen's manual: https://linux.die.net/man/1/pwgen | ||
or can follow the usages by `pwgen-go -help` or `pwgen-go -h`. | ||
|
||
## Download | ||
|
||
```bash | ||
go get -u github.com/vuon9/pwgen-go | ||
``` | ||
|
||
## Usages | ||
|
||
```md | ||
Usage: pwgen-go [ OPTIONS ] [pw_length] [num_pw] | ||
Options supported by pwgen-go: | ||
-h or -help | ||
Get help | ||
-c or -capitalize | ||
Include at least one capital letter in the password | ||
-A or -no-capitalize | ||
Don't include capital letters in the password | ||
-n or -numerals | ||
Include at least one number in the password | ||
-0 or -no-numerals | ||
Don't include numbers in the password | ||
-y or -symbol | ||
Include at least one special symbol in the password | ||
-r <chars> or --remove-chars=<chars> | ||
Remove characters from the set of characters to generate passwords | ||
-H or -sha1=path/to/file[#seed] | ||
Use sha1 hash of given file as a (not so) random generator | ||
-B or -ambigous | ||
Don't include ambiguous characters in the password | ||
-v or -no-vowels | ||
Do not use any vowels so as to avoid accidental nasty words | ||
-s or -secure | ||
Generate completely random passwords | ||
-column | ||
Print the generated passwords in columns | ||
-no-column | ||
Don't print the generated passwords in columns | ||
-vvv or -debug | ||
Enable debug mode | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.