users

package
v0.0.0-...-4cac649 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(size int) *DB

NewDB create a new UserDB with "size" users.

func (*DB) ByID

func (db *DB) ByID(id int) (User, bool)

ByID returns user name from id.

func (*DB) Kind

func (*DB) Kind() string

type User

type User struct {
	ID   int
	Name string
}

Jump to

Keyboard shortcuts

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