generated from VLADIMIR/template
add images
This commit is contained in:
@@ -4,6 +4,7 @@ type Place struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
Text string `json:"text"`
|
||||
Image string `json:"image"`
|
||||
Applications []*Application `json:"applications,omitempty"`
|
||||
Hidden bool `json:"hidden"`
|
||||
Doors []*Door `json:"doors"`
|
||||
@@ -36,6 +37,13 @@ func NewClientErrorPlace(code string) *Place {
|
||||
|
||||
type PlaceOpt func(place *Place) error
|
||||
|
||||
func WithPlaceImage(image string) PlaceOpt {
|
||||
return func(place *Place) error {
|
||||
place.Image = image
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func WithPlaceApplication(applications ...*Application) PlaceOpt {
|
||||
return func(place *Place) error {
|
||||
for _, application := range applications {
|
||||
|
||||
Reference in New Issue
Block a user