username_blacklist

package module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2023 License: MPL-2.0 Imports: 0 Imported by: 0

README

username-blacklist

Go Reference Tests Go Report Card License

Username Blacklist checks usernames, that you might not want to grant as a username.

Installation

go get github.com/caffeines/username-blacklist

Usage

package main

import (
	"fmt"
	"github.com/caffeines/username-blacklist"
)

func main() {
	blacklisted := username_blacklist.Blacklisted("admin")
	fmt.Println("blacklisted:", blacklisted)
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

License

This project is released under the MPL2.0 License. See the bundled LICENSE file for details.

Credits

Documentation

Overview

Package username_blacklist checks usernames, that you might not want to grant as a username.

Example:

package main

import (
	"fmt"
	"github.com/caffeines/username-blacklist"
)

func main() {
	blacklisted := username_blacklist.Blacklisted("admin")
	fmt.Println("blacklisted:", blacklisted)
}

Requests or bugs? https://github.com/caffeines/username-blacklist/issues

Example
package main

import (
	"fmt"
	username_blacklist "github.com/caffeines/username-blacklist"
)

func main() {
	exists := username_blacklist.Blacklisted("admin")
	fmt.Println(exists)
	exists = username_blacklist.Blacklisted("caffeines")
	fmt.Println(exists)
}
Output:

true
false

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blacklisted

func Blacklisted(username string) bool

Blacklisted returns true if the username is blacklisted

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL