diff --git a/snippets/go.json b/snippets/go.json index 206fcd8..79edb5b 100644 --- a/snippets/go.json +++ b/snippets/go.json @@ -24,5 +24,20 @@ "body": [ "ctx := context.Background()" ] + }, + "cok": { + "prefix": "cok", + "body": [ + "c.JSON(http.StatusOK, vo.Success($1))" + ] + }, + "cbad": { + "prefix": "cbad", + "body": [ + "if err != nil {", + " c.JSON(http.StatusBadRequest, vo.Fail(err))", + " return", + "}" + ] } }