如何在Go / Goa框架中正确弃用API端点?

What is the correct way of deprecating endpoint in go / goa framework e.g.:

a.Action("foo", func() {
    a.Routing(
        a.PATCH("/foo"),
    )
    a.Description("Test endpoint")
    a.Response(d.OK, func() {
        a.Media(someTestMediaType)
    })
    a.Response(d.Accepted, func() {
        a.Media(someTestMediaType)
    })
    a.Response(d.BadRequest, JSONAPIErrors)
    a.Response(d.InternalServerError, JSONAPIErrors)
})

In java / spring world I would just put @Deprecated annotation on controller method and if swagger is in place it would also mark it is deprecated so that this would be reflected both in code & UI:

enter image description here

Wondering what is go / goa equivalent for this ?

// Deprecated: Use strings.HasPrefix instead.

will work.

enter image description here