A Go package for generating secure and memorable passwords. It serves as the backbone for mempass and mempass-api
go get github.com/eljamo/libpass/v7
package main
import (
"fmt"
"github.com/eljamo/libpass/v7/config"
"github.com/eljamo/libpass/v7/service"
)
func main() {
cfg, err := config.New()
if err != nil {
fmt.Println(err)
}
svc, err := service.NewPasswordGeneratorService(cfg)
if err != nil {
fmt.Println(err)
}
pws, err := svc.Generate()
if err != nil {
fmt.Println(err)
}
fmt.Println(pws)
}
$ go run ./example/example.go
[^^77%TWIKI%ardently%STORM%58^^ ^^57.HIGH.DOLL.GRAY.67^^ ::90:passive:FEELS:WASTING:40::]
If you'd like to contribute, please fork the repository and work your magic. Open a pull request to the main
branch if it is a bugfix
or feature
branch. If it is a hotfix
branch, open a pull request to the respective release
branch.
go test --race --shuffle on ./...
go run ./example/example.go
bugfix/*
feature/*
main
release/v*
hotfix/*
-
feature
andbugfix
branches:feature
Branches: Create these for new features you are developing.bugfix
Branches: Create these for fixing bugs identified in themain
branch.- Once the feature or fix is complete, merge these branches back into the
main
branch.
-
main
branch:- The
main
branch serves as the central integration branch where allfeature
andbugfix
branches are merged.
- The
-
release
branch:- When you are ready to make a release, create a
release
branch from themain
branch. - Perform any final testing and adjustments on the
release
branch. - Once the release is stable, it can be deployed from this branch.
- When you are ready to make a release, create a
-
hotfix
branch:- If a critical issue is found after the release, create a
hotfix
branch from therelease
branch. - Fix the issue on the
hotfix
branch and then merge it back into both therelease
andmain
branches if applicable. - This ensures that the fix is included in the current release(s) and the
main
branch.
- If a critical issue is found after the release, create a
-
Developing a feature:
- Create a
feature
branch frommain
. - Develop and test the feature on the
feature
branch. - Merge the
feature
branch intomain
.
- Create a
-
Fixing a bug:
- Create a
bugfix
branch frommain
. - Fix and test the bug on the
bugfix
branch. - Merge the
bugfix
branch intomain
.
- Create a
-
Making a release:
- Create a
release
branch frommain
or anotherrelease
branch. - Perform testing on
release
branch. - Deploy the
release
branch.
- Create a
-
Applying a hotfix:
- Create a
hotfix
branch from arelease
branch. - Fix the critical issue on
hotfix
branch. - Merge
hotfix
branch into therelease
andmain
branches.
- Create a