rename db.UserList->GetUsers
This commit is contained in:
parent
504363799e
commit
a155818a36
2 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,7 @@ func cmdListUsers(args []string) error {
|
|||
headerFlag := flagset.Bool("no-header", false, "skip printing the header")
|
||||
flagset.Parse(args[1:])
|
||||
db := getDB()
|
||||
users, err := db.UserList()
|
||||
users, err := db.GetUsers()
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, "Error:", err)
|
||||
os.Exit(1)
|
||||
|
|
2
db/db.go
2
db/db.go
|
@ -58,7 +58,7 @@ func (db *DB) UserAdd(username, email, pwd string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (db *DB) UserList() ([]User, error) {
|
||||
func (db *DB) GetUsers() ([]User, error) {
|
||||
var users []User
|
||||
_, err := db.PgDB.Query(&users, "SELECT * FROM users.users")
|
||||
if err != nil {
|
||||
|
|
Reference in a new issue