A vibe coded tangled fork which supports pijul.
at 0a8187a566ee0e8b2efbcc746fe5014f92fcc8e3 25 lines 443 B view raw
1package models 2 3import ( 4 "encoding/json" 5 "time" 6) 7 8type PublicKey struct { 9 Did string `json:"did"` 10 Key string `json:"key"` 11 Name string `json:"name"` 12 Rkey string `json:"rkey"` 13 Created *time.Time 14} 15 16func (p PublicKey) MarshalJSON() ([]byte, error) { 17 type Alias PublicKey 18 return json.Marshal(&struct { 19 Created string `json:"created"` 20 *Alias 21 }{ 22 Created: p.Created.Format(time.RFC3339), 23 Alias: (*Alias)(&p), 24 }) 25}