1
0
Fork 0
forked from boyska/feedpanel

showusers has some more information

This commit is contained in:
boyska 2018-09-29 21:55:30 +02:00
parent 5daf507569
commit 9e911272af
2 changed files with 6 additions and 1 deletions

View file

@ -181,7 +181,7 @@ func cmdShowUser(args []string) error {
if err != nil {
return err
}
fmt.Println(user)
fmt.Println(user.Details())
return nil
}

View file

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