model pointer string representation.
This commit is contained in:
parent
52a680dcd7
commit
6cd80ca66a
7 changed files with 35 additions and 0 deletions
|
@ -2,6 +2,7 @@ package models
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
@ -19,6 +20,10 @@ type Species struct {
|
|||
DeletedAt NullTime `db:"deleted_at" json:"deletedAt"`
|
||||
}
|
||||
|
||||
func (m *Species) String() string {
|
||||
return fmt.Sprintf("%v", *m)
|
||||
}
|
||||
|
||||
func NewSpecies() *Species {
|
||||
return &Species{SpeciesName: "Test Species"}
|
||||
}
|
||||
|
|
Reference in a new issue