mirror of
https://github.com/kevin-DL/m3o-go.git
synced 2026-01-19 05:25:19 +00:00
Commit from m3o/m3o action
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"go.m3o.com/password"
|
||||
)
|
||||
|
||||
// Generate a strong random 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{
|
||||
|
||||
21
examples/password/generate/generatePasswordWithoutSpecialCharacters/main.go
Executable file
21
examples/password/generate/generatePasswordWithoutSpecialCharacters/main.go
Executable file
@@ -0,0 +1,21 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user