rename db.UserList->GetUsers

This commit is contained in:
boyska 2018-09-29 14:32:42 +02:00
parent 504363799e
commit a155818a36
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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 {