diff --git a/cmd/panelcli/cli.go b/cmd/panelcli/cli.go index 0bd52f2..0459c7e 100644 --- a/cmd/panelcli/cli.go +++ b/cmd/panelcli/cli.go @@ -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) diff --git a/db/db.go b/db/db.go index efd7b7c..34c08c2 100644 --- a/db/db.go +++ b/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 {