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.gobugfix/*feature/*mainrelease/v*hotfix/*
-
featureandbugfixbranches:featureBranches: Create these for new features you are developing.bugfixBranches: Create these for fixing bugs identified in themainbranch.- Once the feature or fix is complete, merge these branches back into the
mainbranch.
-
mainbranch:- The
mainbranch serves as the central integration branch where allfeatureandbugfixbranches are merged.
- The
-
releasebranch:- When you are ready to make a release, create a
releasebranch from themainbranch. - Perform any final testing and adjustments on the
releasebranch. - Once the release is stable, it can be deployed from this branch.
- When you are ready to make a release, create a
-
hotfixbranch:- If a critical issue is found after the release, create a
hotfixbranch from thereleasebranch. - Fix the issue on the
hotfixbranch and then merge it back into both thereleaseandmainbranches if applicable. - This ensures that the fix is included in the current release(s) and the
mainbranch.
- If a critical issue is found after the release, create a
-
Developing a feature:
- Create a
featurebranch frommain. - Develop and test the feature on the
featurebranch. - Merge the
featurebranch intomain.
- Create a
-
Fixing a bug:
- Create a
bugfixbranch frommain. - Fix and test the bug on the
bugfixbranch. - Merge the
bugfixbranch intomain.
- Create a
-
Making a release:
- Create a
releasebranch frommainor anotherreleasebranch. - Perform testing on
releasebranch. - Deploy the
releasebranch.
- Create a
-
Applying a hotfix:
- Create a
hotfixbranch from areleasebranch. - Fix the critical issue on
hotfixbranch. - Merge
hotfixbranch into thereleaseandmainbranches.
- Create a