mirror of
https://github.com/ForFarmTeam/ForFarm.git
synced 2025-12-18 13:34:08 +01:00
18 lines
354 B
Go
18 lines
354 B
Go
package api
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type HelloworldOutput struct {
|
|
Body struct {
|
|
Message string `json:"message" example:"Hello, world!" doc:"Greeting message"`
|
|
}
|
|
}
|
|
|
|
func (a *api) helloWorldHandler(ctx context.Context, input *struct{}) (*HelloworldOutput, error) {
|
|
resp := &HelloworldOutput{}
|
|
resp.Body.Message = "Hello, world!"
|
|
return resp, nil
|
|
}
|