Files
m3o-go/examples/password/generate/generatePasswordWithoutSpecialCharacters/main.go
2022-03-02 17:15:22 +00:00

22 lines
473 B
Go
Executable File

package main
import (
"fmt"
"os"
"go.m3o.com/password"
)
// Generate a strong random password. Use the switches to control which character types are included, defaults to using all of them
func main() {
passwordService := password.NewPasswordService(os.Getenv("M3O_API_TOKEN"))
rsp, err := passwordService.Generate(&password.GenerateRequest{
Length: 16,
Lowercase: true,
Numbers: true,
Special: false,
Uppercase: true,
})
fmt.Println(rsp, err)
}