mirror of
https://github.com/NohamR/papeer.git
synced 2026-05-26 04:17:21 +00:00
json output for list command
This commit is contained in:
12
book/link.go
12
book/link.go
@@ -1,18 +1,10 @@
|
||||
package book
|
||||
|
||||
type link struct {
|
||||
href string
|
||||
text string
|
||||
Href string `json:"href"`
|
||||
Text string `json:"name"`
|
||||
}
|
||||
|
||||
func NewLink(href, text string) link {
|
||||
return link{href, text}
|
||||
}
|
||||
|
||||
func (c link) Href() string {
|
||||
return c.href
|
||||
}
|
||||
|
||||
func (c link) Text() string {
|
||||
return c.text
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user