forked from boyska/feedpanel
showusers has some more information
This commit is contained in:
parent
5daf507569
commit
9e911272af
2 changed files with 6 additions and 1 deletions
|
@ -181,7 +181,7 @@ func cmdShowUser(args []string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
fmt.Println(user)
|
||||
fmt.Println(user.Details())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
5
db/db.go
5
db/db.go
|
@ -21,6 +21,11 @@ func (u User) String() string {
|
|||
return fmt.Sprintf("{User: %s <%s>}", u.Name, u.Email)
|
||||
}
|
||||
|
||||
func (u User) Details() string {
|
||||
return fmt.Sprintf("UID:\t%s\nName:\t%s\nEmail:\t%s\nCreated:\t%s",
|
||||
u.ID, u.Name, u.Email, u.DateCreated)
|
||||
}
|
||||
|
||||
// DB represents the application database. It provides high-level methods to get and manipulate objects.
|
||||
type DB struct {
|
||||
PgDB *pg.DB
|
||||
|
|
Loading…
Reference in a new issue