aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-07-09 13:22:59 +0200
committerMichael Muré <batolettre@gmail.com>2019-07-09 13:22:59 +0200
commit14022953823fc768849b6cc826b05b61a89b7626 (patch)
tree4d4f70ee46b9cc230d6602cb066c697f8a0a4e8e
parenta5c42b7c11fc082d47027ba5e0dbdeddcc14e62e (diff)
downloadgit-bug-14022953823fc768849b6cc826b05b61a89b7626.tar.gz
graphql: don't use the gqlgen command to generate to avoid pulling urfave/cli
-rw-r--r--Gopkg.lock15
-rw-r--r--graphql/gen_graphql.go22
-rw-r--r--graphql/graph/gen_graph.go3301
-rw-r--r--vendor/github.com/99designs/gqlgen/cmd/ambient.go10
-rw-r--r--vendor/github.com/99designs/gqlgen/cmd/gen.go44
-rw-r--r--vendor/github.com/99designs/gqlgen/cmd/init.go144
-rw-r--r--vendor/github.com/99designs/gqlgen/cmd/root.go44
-rw-r--r--vendor/github.com/99designs/gqlgen/cmd/version.go16
-rw-r--r--vendor/github.com/99designs/gqlgen/plugin/servergen/server.go49
-rw-r--r--vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl20
-rw-r--r--vendor/github.com/urfave/cli/.flake82
-rw-r--r--vendor/github.com/urfave/cli/.gitignore2
-rw-r--r--vendor/github.com/urfave/cli/.travis.yml27
-rw-r--r--vendor/github.com/urfave/cli/CHANGELOG.md435
-rw-r--r--vendor/github.com/urfave/cli/LICENSE21
-rw-r--r--vendor/github.com/urfave/cli/README.md1381
-rw-r--r--vendor/github.com/urfave/cli/app.go497
-rw-r--r--vendor/github.com/urfave/cli/appveyor.yml26
-rw-r--r--vendor/github.com/urfave/cli/category.go44
-rw-r--r--vendor/github.com/urfave/cli/cli.go22
-rw-r--r--vendor/github.com/urfave/cli/command.go304
-rw-r--r--vendor/github.com/urfave/cli/context.go278
-rw-r--r--vendor/github.com/urfave/cli/errors.go115
-rw-r--r--vendor/github.com/urfave/cli/flag-types.json93
-rw-r--r--vendor/github.com/urfave/cli/flag.go799
-rw-r--r--vendor/github.com/urfave/cli/flag_generated.go627
-rw-r--r--vendor/github.com/urfave/cli/funcs.go28
-rwxr-xr-xvendor/github.com/urfave/cli/generate-flag-types255
-rw-r--r--vendor/github.com/urfave/cli/help.go338
-rwxr-xr-xvendor/github.com/urfave/cli/runtests122
30 files changed, 2683 insertions, 6398 deletions
diff --git a/Gopkg.lock b/Gopkg.lock
index b60cb83c..08e20a09 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -2,11 +2,10 @@
[[projects]]
- digest = "1:ecbcc5f2c6b45a565d5bdc316317671a308f56adb202e0f762d91e42aa9e2060"
+ digest = "1:5038f1f51cfeed48d9643aeb573ecf62393a50ba3165322462e86e6a6d290a19"
name = "github.com/99designs/gqlgen"
packages = [
"api",
- "cmd",
"codegen",
"codegen/config",
"codegen/templates",
@@ -20,7 +19,6 @@
"plugin/modelgen",
"plugin/resolvergen",
"plugin/schemaconfig",
- "plugin/servergen",
]
pruneopts = "UT"
revision = "b128a29122e8ca8ada5f34cc18338fa7c10fc5b4"
@@ -315,14 +313,6 @@
version = "v1.11.0"
[[projects]]
- digest = "1:b24d38b282bacf9791408a080f606370efa3d364e4b5fd9ba0f7b87786d3b679"
- name = "github.com/urfave/cli"
- packages = ["."]
- pruneopts = "UT"
- revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1"
- version = "v1.20.0"
-
-[[projects]]
digest = "1:895fa0f564003de2498fbaf00be596fa814655ab445ce7cc215f7724bb6831ae"
name = "github.com/vektah/gqlgen"
packages = ["client"]
@@ -445,7 +435,8 @@
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
- "github.com/99designs/gqlgen/cmd",
+ "github.com/99designs/gqlgen/api",
+ "github.com/99designs/gqlgen/codegen/config",
"github.com/99designs/gqlgen/graphql",
"github.com/99designs/gqlgen/graphql/introspection",
"github.com/99designs/gqlgen/handler",
diff --git a/graphql/gen_graphql.go b/graphql/gen_graphql.go
index 41fa71a9..47f2c458 100644
--- a/graphql/gen_graphql.go
+++ b/graphql/gen_graphql.go
@@ -4,12 +4,30 @@ package main
import (
"fmt"
+ "io/ioutil"
+ "log"
+ "os"
- "github.com/99designs/gqlgen/cmd"
+ "github.com/99designs/gqlgen/api"
+ "github.com/99designs/gqlgen/codegen/config"
+ "github.com/pkg/errors"
)
func main() {
fmt.Println("Generating graphql code ...")
- cmd.Execute()
+ log.SetOutput(ioutil.Discard)
+
+ cfg, err := config.LoadConfigFromDefaultLocations()
+ if os.IsNotExist(errors.Cause(err)) {
+ cfg = config.DefaultConfig()
+ } else if err != nil {
+ _, _ = fmt.Fprintln(os.Stderr, err.Error())
+ os.Exit(2)
+ }
+
+ if err = api.Generate(cfg); err != nil {
+ _, _ = fmt.Fprintln(os.Stderr, err.Error())
+ os.Exit(3)
+ }
}
diff --git a/graphql/graph/gen_graph.go b/graphql/graph/gen_graph.go
index 36dc9735..d6d33e93 100644
--- a/graphql/graph/gen_graph.go
+++ b/graphql/graph/gen_graph.go
@@ -1787,21 +1787,6 @@ type executionContext struct {
*executableSchema
}
-func (ec *executionContext) FieldMiddleware(ctx context.Context, obj interface{}, next graphql.Resolver) (ret interface{}) {
- defer func() {
- if r := recover(); r != nil {
- ec.Error(ctx, ec.Recover(ctx, r))
- ret = nil
- }
- }()
- res, err := ec.ResolverMiddleware(ctx, next)
- if err != nil {
- ec.Error(ctx, err)
- return nil
- }
- return res
-}
-
func (ec *executionContext) introspectSchema() (*introspection.Schema, error) {
if ec.DisableIntrospection {
return nil, errors.New("introspection disabled")
@@ -2296,7 +2281,7 @@ type Mutation {
openBug(input: OpenBugInput!): OpenBugPayload!
"""Change a bug's status to closed"""
closeBug(input: CloseBugInput!): CloseBugPayload!
- """Change a bug's titlel"""
+ """Change a bug's title"""
setTitle(input: SetTitleInput!): SetTitlePayload!
"""Commit write the pending operations into storage. This mutation fail if nothing is pending"""
commit(input: CommitInput!): CommitPayload!
@@ -2908,11 +2893,21 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg
// endregion ***************************** args.gotpl *****************************
+// region ************************** directives.gotpl **************************
+
+// endregion ************************** directives.gotpl **************************
+
// region **************************** field.gotpl *****************************
-func (ec *executionContext) _AddCommentOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _AddCommentOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentOperation",
Field: field,
@@ -2921,10 +2916,14 @@ func (ec *executionContext) _AddCommentOperation_hash(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash()
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -2937,9 +2936,15 @@ func (ec *executionContext) _AddCommentOperation_hash(ctx context.Context, field
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentOperation",
Field: field,
@@ -2948,10 +2953,14 @@ func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -2964,9 +2973,15 @@ func (ec *executionContext) _AddCommentOperation_author(ctx context.Context, fie
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentOperation",
Field: field,
@@ -2975,10 +2990,14 @@ func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.AddCommentOperation().Date(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -2991,9 +3010,15 @@ func (ec *executionContext) _AddCommentOperation_date(ctx context.Context, field
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentOperation",
Field: field,
@@ -3002,10 +3027,14 @@ func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, fi
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3018,9 +3047,15 @@ func (ec *executionContext) _AddCommentOperation_message(ctx context.Context, fi
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentOperation",
Field: field,
@@ -3029,10 +3064,14 @@ func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3045,9 +3084,15 @@ func (ec *executionContext) _AddCommentOperation_files(ctx context.Context, fiel
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) graphql.Marshaler {
+func (ec *executionContext) _AddCommentPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentPayload",
Field: field,
@@ -3056,10 +3101,14 @@ func (ec *executionContext) _AddCommentPayload_clientMutationId(ctx context.Cont
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -3069,9 +3118,15 @@ func (ec *executionContext) _AddCommentPayload_clientMutationId(ctx context.Cont
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) graphql.Marshaler {
+func (ec *executionContext) _AddCommentPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentPayload",
Field: field,
@@ -3080,10 +3135,14 @@ func (ec *executionContext) _AddCommentPayload_bug(ctx context.Context, field gr
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3096,9 +3155,15 @@ func (ec *executionContext) _AddCommentPayload_bug(ctx context.Context, field gr
return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) graphql.Marshaler {
+func (ec *executionContext) _AddCommentPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.AddCommentPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentPayload",
Field: field,
@@ -3107,10 +3172,14 @@ func (ec *executionContext) _AddCommentPayload_operation(ctx context.Context, fi
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3123,9 +3192,15 @@ func (ec *executionContext) _AddCommentPayload_operation(ctx context.Context, fi
return ec.marshalNAddCommentOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐAddCommentOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentTimelineItem",
Field: field,
@@ -3134,10 +3209,14 @@ func (ec *executionContext) _AddCommentTimelineItem_hash(ctx context.Context, fi
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3150,9 +3229,15 @@ func (ec *executionContext) _AddCommentTimelineItem_hash(ctx context.Context, fi
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentTimelineItem",
Field: field,
@@ -3161,10 +3246,14 @@ func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3177,9 +3266,15 @@ func (ec *executionContext) _AddCommentTimelineItem_author(ctx context.Context,
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentTimelineItem",
Field: field,
@@ -3188,10 +3283,14 @@ func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3204,9 +3303,15 @@ func (ec *executionContext) _AddCommentTimelineItem_message(ctx context.Context,
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentTimelineItem",
Field: field,
@@ -3215,10 +3320,14 @@ func (ec *executionContext) _AddCommentTimelineItem_messageIsEmpty(ctx context.C
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MessageIsEmpty(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3231,9 +3340,15 @@ func (ec *executionContext) _AddCommentTimelineItem_messageIsEmpty(ctx context.C
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentTimelineItem",
Field: field,
@@ -3242,10 +3357,14 @@ func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3258,9 +3377,15 @@ func (ec *executionContext) _AddCommentTimelineItem_files(ctx context.Context, f
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentTimelineItem",
Field: field,
@@ -3269,10 +3394,14 @@ func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Contex
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.AddCommentTimelineItem().CreatedAt(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3285,9 +3414,15 @@ func (ec *executionContext) _AddCommentTimelineItem_createdAt(ctx context.Contex
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentTimelineItem",
Field: field,
@@ -3296,10 +3431,14 @@ func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.AddCommentTimelineItem().LastEdit(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3312,9 +3451,15 @@ func (ec *executionContext) _AddCommentTimelineItem_lastEdit(ctx context.Context
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentTimelineItem",
Field: field,
@@ -3323,10 +3468,14 @@ func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edited(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3339,9 +3488,15 @@ func (ec *executionContext) _AddCommentTimelineItem_edited(ctx context.Context,
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.AddCommentTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "AddCommentTimelineItem",
Field: field,
@@ -3350,10 +3505,14 @@ func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.History, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3366,9 +3525,15 @@ func (ec *executionContext) _AddCommentTimelineItem_history(ctx context.Context,
return ec.marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCommentHistoryStep(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3377,10 +3542,14 @@ func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.Collected
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Id(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3393,9 +3562,15 @@ func (ec *executionContext) _Bug_id(ctx context.Context, field graphql.Collected
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3404,10 +3579,14 @@ func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.Coll
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.HumanId(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3420,9 +3599,15 @@ func (ec *executionContext) _Bug_humanId(ctx context.Context, field graphql.Coll
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3431,10 +3616,14 @@ func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.Colle
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Bug().Status(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3447,9 +3636,15 @@ func (ec *executionContext) _Bug_status(ctx context.Context, field graphql.Colle
return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3458,10 +3653,14 @@ func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.Collec
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Title, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3474,9 +3673,15 @@ func (ec *executionContext) _Bug_title(ctx context.Context, field graphql.Collec
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3485,10 +3690,14 @@ func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.Colle
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Labels, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3501,9 +3710,15 @@ func (ec *executionContext) _Bug_labels(ctx context.Context, field graphql.Colle
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3512,10 +3727,14 @@ func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.Colle
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3528,9 +3747,15 @@ func (ec *executionContext) _Bug_author(ctx context.Context, field graphql.Colle
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3539,10 +3764,14 @@ func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.Co
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.CreatedAt, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3555,9 +3784,15 @@ func (ec *executionContext) _Bug_createdAt(ctx context.Context, field graphql.Co
return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3566,10 +3801,14 @@ func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.Col
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Bug().LastEdit(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3582,9 +3821,15 @@ func (ec *executionContext) _Bug_lastEdit(ctx context.Context, field graphql.Col
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3600,10 +3845,14 @@ func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.Colle
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Bug().Actors(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3616,9 +3865,15 @@ func (ec *executionContext) _Bug_actors(ctx context.Context, field graphql.Colle
return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3634,10 +3889,14 @@ func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Bug().Participants(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3650,9 +3909,15 @@ func (ec *executionContext) _Bug_participants(ctx context.Context, field graphql
return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3668,10 +3933,14 @@ func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.Col
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Bug().Comments(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3684,9 +3953,15 @@ func (ec *executionContext) _Bug_comments(ctx context.Context, field graphql.Col
return ec.marshalNCommentConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3702,10 +3977,14 @@ func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.Col
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Bug().Timeline(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3718,9 +3997,15 @@ func (ec *executionContext) _Bug_timeline(ctx context.Context, field graphql.Col
return ec.marshalNTimelineItemConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) graphql.Marshaler {
+func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.CollectedField, obj *bug.Snapshot) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Bug",
Field: field,
@@ -3736,10 +4021,14 @@ func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.C
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Bug().Operations(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3752,9 +4041,15 @@ func (ec *executionContext) _Bug_operations(ctx context.Context, field graphql.C
return ec.marshalNOperationConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
+func (ec *executionContext) _BugConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "BugConnection",
Field: field,
@@ -3763,10 +4058,14 @@ func (ec *executionContext) _BugConnection_edges(ctx context.Context, field grap
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3779,9 +4078,15 @@ func (ec *executionContext) _BugConnection_edges(ctx context.Context, field grap
return ec.marshalNBugEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugEdge(ctx, field.Selections, res)
}
-func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
+func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "BugConnection",
Field: field,
@@ -3790,10 +4095,14 @@ func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field grap
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3806,9 +4115,15 @@ func (ec *executionContext) _BugConnection_nodes(ctx context.Context, field grap
return ec.marshalNBug2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
+func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "BugConnection",
Field: field,
@@ -3817,10 +4132,14 @@ func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field g
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3833,9 +4152,15 @@ func (ec *executionContext) _BugConnection_pageInfo(ctx context.Context, field g
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) graphql.Marshaler {
+func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.BugConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "BugConnection",
Field: field,
@@ -3844,10 +4169,14 @@ func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3860,9 +4189,15 @@ func (ec *executionContext) _BugConnection_totalCount(ctx context.Context, field
return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler {
+func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "BugEdge",
Field: field,
@@ -3871,10 +4206,14 @@ func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.C
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3887,9 +4226,15 @@ func (ec *executionContext) _BugEdge_cursor(ctx context.Context, field graphql.C
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) graphql.Marshaler {
+func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.BugEdge) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "BugEdge",
Field: field,
@@ -3898,10 +4243,14 @@ func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.Col
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3914,9 +4263,15 @@ func (ec *executionContext) _BugEdge_node(ctx context.Context, field graphql.Col
return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _ChangeLabelPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) graphql.Marshaler {
+func (ec *executionContext) _ChangeLabelPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "ChangeLabelPayload",
Field: field,
@@ -3925,10 +4280,14 @@ func (ec *executionContext) _ChangeLabelPayload_clientMutationId(ctx context.Con
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -3938,9 +4297,15 @@ func (ec *executionContext) _ChangeLabelPayload_clientMutationId(ctx context.Con
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _ChangeLabelPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) graphql.Marshaler {
+func (ec *executionContext) _ChangeLabelPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "ChangeLabelPayload",
Field: field,
@@ -3949,10 +4314,14 @@ func (ec *executionContext) _ChangeLabelPayload_bug(ctx context.Context, field g
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3965,9 +4334,15 @@ func (ec *executionContext) _ChangeLabelPayload_bug(ctx context.Context, field g
return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _ChangeLabelPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) graphql.Marshaler {
+func (ec *executionContext) _ChangeLabelPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "ChangeLabelPayload",
Field: field,
@@ -3976,10 +4351,14 @@ func (ec *executionContext) _ChangeLabelPayload_operation(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -3992,9 +4371,15 @@ func (ec *executionContext) _ChangeLabelPayload_operation(ctx context.Context, f
return ec.marshalNLabelChangeOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelChangeOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _ChangeLabelPayload_results(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) graphql.Marshaler {
+func (ec *executionContext) _ChangeLabelPayload_results(ctx context.Context, field graphql.CollectedField, obj *models.ChangeLabelPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "ChangeLabelPayload",
Field: field,
@@ -4003,10 +4388,14 @@ func (ec *executionContext) _ChangeLabelPayload_results(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Results, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4019,9 +4408,15 @@ func (ec *executionContext) _ChangeLabelPayload_results(ctx context.Context, fie
return ec.marshalNLabelChangeResult2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabelChangeResult(ctx, field.Selections, res)
}
-func (ec *executionContext) _CloseBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) graphql.Marshaler {
+func (ec *executionContext) _CloseBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CloseBugPayload",
Field: field,
@@ -4030,10 +4425,14 @@ func (ec *executionContext) _CloseBugPayload_clientMutationId(ctx context.Contex
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -4043,9 +4442,15 @@ func (ec *executionContext) _CloseBugPayload_clientMutationId(ctx context.Contex
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CloseBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) graphql.Marshaler {
+func (ec *executionContext) _CloseBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CloseBugPayload",
Field: field,
@@ -4054,10 +4459,14 @@ func (ec *executionContext) _CloseBugPayload_bug(ctx context.Context, field grap
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4070,9 +4479,15 @@ func (ec *executionContext) _CloseBugPayload_bug(ctx context.Context, field grap
return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _CloseBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) graphql.Marshaler {
+func (ec *executionContext) _CloseBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.CloseBugPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CloseBugPayload",
Field: field,
@@ -4081,10 +4496,14 @@ func (ec *executionContext) _CloseBugPayload_operation(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4097,9 +4516,15 @@ func (ec *executionContext) _CloseBugPayload_operation(ctx context.Context, fiel
return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSetStatusOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _Color_R(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) graphql.Marshaler {
+func (ec *executionContext) _Color_R(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Color",
Field: field,
@@ -4108,10 +4533,14 @@ func (ec *executionContext) _Color_R(ctx context.Context, field graphql.Collecte
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Color().R(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4124,9 +4553,15 @@ func (ec *executionContext) _Color_R(ctx context.Context, field graphql.Collecte
return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Color_G(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) graphql.Marshaler {
+func (ec *executionContext) _Color_G(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Color",
Field: field,
@@ -4135,10 +4570,14 @@ func (ec *executionContext) _Color_G(ctx context.Context, field graphql.Collecte
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Color().G(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4151,9 +4590,15 @@ func (ec *executionContext) _Color_G(ctx context.Context, field graphql.Collecte
return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Color_B(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) graphql.Marshaler {
+func (ec *executionContext) _Color_B(ctx context.Context, field graphql.CollectedField, obj *color.RGBA) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Color",
Field: field,
@@ -4162,10 +4607,14 @@ func (ec *executionContext) _Color_B(ctx context.Context, field graphql.Collecte
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Color().B(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4178,9 +4627,15 @@ func (ec *executionContext) _Color_B(ctx context.Context, field graphql.Collecte
return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler {
+func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Comment",
Field: field,
@@ -4189,10 +4644,14 @@ func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.C
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4205,9 +4664,15 @@ func (ec *executionContext) _Comment_author(ctx context.Context, field graphql.C
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler {
+func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Comment",
Field: field,
@@ -4216,10 +4681,14 @@ func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4232,9 +4701,15 @@ func (ec *executionContext) _Comment_message(ctx context.Context, field graphql.
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) graphql.Marshaler {
+func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.CollectedField, obj *bug.Comment) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Comment",
Field: field,
@@ -4243,10 +4718,14 @@ func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.Co
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4259,9 +4738,15 @@ func (ec *executionContext) _Comment_files(ctx context.Context, field graphql.Co
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
+func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommentConnection",
Field: field,
@@ -4270,10 +4755,14 @@ func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4286,9 +4775,15 @@ func (ec *executionContext) _CommentConnection_edges(ctx context.Context, field
return ec.marshalNCommentEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommentEdge(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
+func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommentConnection",
Field: field,
@@ -4297,10 +4792,14 @@ func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4313,9 +4812,15 @@ func (ec *executionContext) _CommentConnection_nodes(ctx context.Context, field
return ec.marshalNComment2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐComment(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
+func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommentConnection",
Field: field,
@@ -4324,10 +4829,14 @@ func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4340,9 +4849,15 @@ func (ec *executionContext) _CommentConnection_pageInfo(ctx context.Context, fie
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) graphql.Marshaler {
+func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.CommentConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommentConnection",
Field: field,
@@ -4351,10 +4866,14 @@ func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4367,9 +4886,15 @@ func (ec *executionContext) _CommentConnection_totalCount(ctx context.Context, f
return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler {
+func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommentEdge",
Field: field,
@@ -4378,10 +4903,14 @@ func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graph
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4394,9 +4923,15 @@ func (ec *executionContext) _CommentEdge_cursor(ctx context.Context, field graph
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) graphql.Marshaler {
+func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.CommentEdge) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommentEdge",
Field: field,
@@ -4405,10 +4940,14 @@ func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4421,9 +4960,15 @@ func (ec *executionContext) _CommentEdge_node(ctx context.Context, field graphql
return ec.marshalNComment2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐComment(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler {
+func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommentHistoryStep",
Field: field,
@@ -4432,10 +4977,14 @@ func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4448,9 +4997,15 @@ func (ec *executionContext) _CommentHistoryStep_message(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) graphql.Marshaler {
+func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field graphql.CollectedField, obj *bug.CommentHistoryStep) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommentHistoryStep",
Field: field,
@@ -4459,10 +5014,14 @@ func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CommentHistoryStep().Date(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4475,9 +5034,15 @@ func (ec *executionContext) _CommentHistoryStep_date(ctx context.Context, field
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitAsNeededPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.CommitAsNeededPayload) graphql.Marshaler {
+func (ec *executionContext) _CommitAsNeededPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.CommitAsNeededPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommitAsNeededPayload",
Field: field,
@@ -4486,10 +5051,14 @@ func (ec *executionContext) _CommitAsNeededPayload_clientMutationId(ctx context.
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -4499,9 +5068,15 @@ func (ec *executionContext) _CommitAsNeededPayload_clientMutationId(ctx context.
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitAsNeededPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.CommitAsNeededPayload) graphql.Marshaler {
+func (ec *executionContext) _CommitAsNeededPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.CommitAsNeededPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommitAsNeededPayload",
Field: field,
@@ -4510,10 +5085,14 @@ func (ec *executionContext) _CommitAsNeededPayload_bug(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4526,9 +5105,15 @@ func (ec *executionContext) _CommitAsNeededPayload_bug(ctx context.Context, fiel
return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.CommitPayload) graphql.Marshaler {
+func (ec *executionContext) _CommitPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.CommitPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommitPayload",
Field: field,
@@ -4537,10 +5122,14 @@ func (ec *executionContext) _CommitPayload_clientMutationId(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -4550,9 +5139,15 @@ func (ec *executionContext) _CommitPayload_clientMutationId(ctx context.Context,
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _CommitPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.CommitPayload) graphql.Marshaler {
+func (ec *executionContext) _CommitPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.CommitPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CommitPayload",
Field: field,
@@ -4561,10 +5156,14 @@ func (ec *executionContext) _CommitPayload_bug(ctx context.Context, field graphq
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4577,9 +5176,15 @@ func (ec *executionContext) _CommitPayload_bug(ctx context.Context, field graphq
return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
+func (ec *executionContext) _CreateOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateOperation",
Field: field,
@@ -4588,10 +5193,14 @@ func (ec *executionContext) _CreateOperation_hash(ctx context.Context, field gra
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash()
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4604,9 +5213,15 @@ func (ec *executionContext) _CreateOperation_hash(ctx context.Context, field gra
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
+func (ec *executionContext) _CreateOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateOperation",
Field: field,
@@ -4615,10 +5230,14 @@ func (ec *executionContext) _CreateOperation_author(ctx context.Context, field g
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4631,9 +5250,15 @@ func (ec *executionContext) _CreateOperation_author(ctx context.Context, field g
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
+func (ec *executionContext) _CreateOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateOperation",
Field: field,
@@ -4642,10 +5267,14 @@ func (ec *executionContext) _CreateOperation_date(ctx context.Context, field gra
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CreateOperation().Date(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4658,9 +5287,15 @@ func (ec *executionContext) _CreateOperation_date(ctx context.Context, field gra
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
+func (ec *executionContext) _CreateOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateOperation",
Field: field,
@@ -4669,10 +5304,14 @@ func (ec *executionContext) _CreateOperation_title(ctx context.Context, field gr
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Title, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4685,9 +5324,15 @@ func (ec *executionContext) _CreateOperation_title(ctx context.Context, field gr
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
+func (ec *executionContext) _CreateOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateOperation",
Field: field,
@@ -4696,10 +5341,14 @@ func (ec *executionContext) _CreateOperation_message(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4712,9 +5361,15 @@ func (ec *executionContext) _CreateOperation_message(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) graphql.Marshaler {
+func (ec *executionContext) _CreateOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateOperation",
Field: field,
@@ -4723,10 +5378,14 @@ func (ec *executionContext) _CreateOperation_files(ctx context.Context, field gr
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4739,9 +5398,15 @@ func (ec *executionContext) _CreateOperation_files(ctx context.Context, field gr
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _CreateTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateTimelineItem",
Field: field,
@@ -4750,10 +5415,14 @@ func (ec *executionContext) _CreateTimelineItem_hash(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4766,9 +5435,15 @@ func (ec *executionContext) _CreateTimelineItem_hash(ctx context.Context, field
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateTimelineItem",
Field: field,
@@ -4777,10 +5452,14 @@ func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4793,9 +5472,15 @@ func (ec *executionContext) _CreateTimelineItem_author(ctx context.Context, fiel
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateTimelineItem",
Field: field,
@@ -4804,10 +5489,14 @@ func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4820,9 +5509,15 @@ func (ec *executionContext) _CreateTimelineItem_message(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _CreateTimelineItem_messageIsEmpty(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateTimelineItem",
Field: field,
@@ -4831,10 +5526,14 @@ func (ec *executionContext) _CreateTimelineItem_messageIsEmpty(ctx context.Conte
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MessageIsEmpty(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4847,9 +5546,15 @@ func (ec *executionContext) _CreateTimelineItem_messageIsEmpty(ctx context.Conte
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateTimelineItem",
Field: field,
@@ -4858,10 +5563,14 @@ func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4874,9 +5583,15 @@ func (ec *executionContext) _CreateTimelineItem_files(ctx context.Context, field
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateTimelineItem",
Field: field,
@@ -4885,10 +5600,14 @@ func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CreateTimelineItem().CreatedAt(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4901,9 +5620,15 @@ func (ec *executionContext) _CreateTimelineItem_createdAt(ctx context.Context, f
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateTimelineItem",
Field: field,
@@ -4912,10 +5637,14 @@ func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, fi
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.CreateTimelineItem().LastEdit(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4928,9 +5657,15 @@ func (ec *executionContext) _CreateTimelineItem_lastEdit(ctx context.Context, fi
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateTimelineItem",
Field: field,
@@ -4939,10 +5674,14 @@ func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edited(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4955,9 +5694,15 @@ func (ec *executionContext) _CreateTimelineItem_edited(ctx context.Context, fiel
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, field graphql.CollectedField, obj *bug.CreateTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "CreateTimelineItem",
Field: field,
@@ -4966,10 +5711,14 @@ func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.History, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -4982,9 +5731,15 @@ func (ec *executionContext) _CreateTimelineItem_history(ctx context.Context, fie
return ec.marshalNCommentHistoryStep2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCommentHistoryStep(ctx, field.Selections, res)
}
-func (ec *executionContext) _EditCommentOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _EditCommentOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "EditCommentOperation",
Field: field,
@@ -4993,10 +5748,14 @@ func (ec *executionContext) _EditCommentOperation_hash(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash()
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5009,9 +5768,15 @@ func (ec *executionContext) _EditCommentOperation_hash(ctx context.Context, fiel
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "EditCommentOperation",
Field: field,
@@ -5020,10 +5785,14 @@ func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, fi
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5036,9 +5805,15 @@ func (ec *executionContext) _EditCommentOperation_author(ctx context.Context, fi
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "EditCommentOperation",
Field: field,
@@ -5047,10 +5822,14 @@ func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.EditCommentOperation().Date(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5063,9 +5842,15 @@ func (ec *executionContext) _EditCommentOperation_date(ctx context.Context, fiel
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "EditCommentOperation",
Field: field,
@@ -5074,10 +5859,14 @@ func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, fi
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Target, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5090,9 +5879,15 @@ func (ec *executionContext) _EditCommentOperation_target(ctx context.Context, fi
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _EditCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _EditCommentOperation_message(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "EditCommentOperation",
Field: field,
@@ -5101,10 +5896,14 @@ func (ec *executionContext) _EditCommentOperation_message(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Message, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5117,9 +5916,15 @@ func (ec *executionContext) _EditCommentOperation_message(ctx context.Context, f
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) graphql.Marshaler {
+func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, field graphql.CollectedField, obj *bug.EditCommentOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "EditCommentOperation",
Field: field,
@@ -5128,10 +5933,14 @@ func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Files, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5144,9 +5953,15 @@ func (ec *executionContext) _EditCommentOperation_files(ctx context.Context, fie
return ec.marshalNHash2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler {
+func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Identity",
Field: field,
@@ -5155,10 +5970,14 @@ func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.Coll
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Identity().ID(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5171,9 +5990,15 @@ func (ec *executionContext) _Identity_id(ctx context.Context, field graphql.Coll
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler {
+func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Identity",
Field: field,
@@ -5182,10 +6007,14 @@ func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Identity().HumanID(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5198,9 +6027,15 @@ func (ec *executionContext) _Identity_humanId(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_name(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler {
+func (ec *executionContext) _Identity_name(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Identity",
Field: field,
@@ -5209,10 +6044,14 @@ func (ec *executionContext) _Identity_name(ctx context.Context, field graphql.Co
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Identity().Name(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -5222,9 +6061,15 @@ func (ec *executionContext) _Identity_name(ctx context.Context, field graphql.Co
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_email(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler {
+func (ec *executionContext) _Identity_email(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Identity",
Field: field,
@@ -5233,10 +6078,14 @@ func (ec *executionContext) _Identity_email(ctx context.Context, field graphql.C
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Identity().Email(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -5246,9 +6095,15 @@ func (ec *executionContext) _Identity_email(ctx context.Context, field graphql.C
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_login(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler {
+func (ec *executionContext) _Identity_login(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Identity",
Field: field,
@@ -5257,10 +6112,14 @@ func (ec *executionContext) _Identity_login(ctx context.Context, field graphql.C
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Identity().Login(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -5270,9 +6129,15 @@ func (ec *executionContext) _Identity_login(ctx context.Context, field graphql.C
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_displayName(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler {
+func (ec *executionContext) _Identity_displayName(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Identity",
Field: field,
@@ -5281,10 +6146,14 @@ func (ec *executionContext) _Identity_displayName(ctx context.Context, field gra
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Identity().DisplayName(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5297,9 +6166,15 @@ func (ec *executionContext) _Identity_displayName(ctx context.Context, field gra
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler {
+func (ec *executionContext) _Identity_avatarUrl(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Identity",
Field: field,
@@ -5308,10 +6183,14 @@ func (ec *executionContext) _Identity_avatarUrl(ctx context.Context, field graph
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Identity().AvatarURL(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -5321,9 +6200,15 @@ func (ec *executionContext) _Identity_avatarUrl(ctx context.Context, field graph
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _Identity_isProtected(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) graphql.Marshaler {
+func (ec *executionContext) _Identity_isProtected(ctx context.Context, field graphql.CollectedField, obj *identity.Interface) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Identity",
Field: field,
@@ -5332,10 +6217,14 @@ func (ec *executionContext) _Identity_isProtected(ctx context.Context, field gra
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Identity().IsProtected(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5348,9 +6237,15 @@ func (ec *executionContext) _Identity_isProtected(ctx context.Context, field gra
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler {
+func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "IdentityConnection",
Field: field,
@@ -5359,10 +6254,14 @@ func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5375,9 +6274,15 @@ func (ec *executionContext) _IdentityConnection_edges(ctx context.Context, field
return ec.marshalNIdentityEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityEdge(ctx, field.Selections, res)
}
-func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler {
+func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "IdentityConnection",
Field: field,
@@ -5386,10 +6291,14 @@ func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5402,9 +6311,15 @@ func (ec *executionContext) _IdentityConnection_nodes(ctx context.Context, field
return ec.marshalNIdentity2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler {
+func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "IdentityConnection",
Field: field,
@@ -5413,10 +6328,14 @@ func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, fi
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5429,9 +6348,15 @@ func (ec *executionContext) _IdentityConnection_pageInfo(ctx context.Context, fi
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) graphql.Marshaler {
+func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.IdentityConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "IdentityConnection",
Field: field,
@@ -5440,10 +6365,14 @@ func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5456,9 +6385,15 @@ func (ec *executionContext) _IdentityConnection_totalCount(ctx context.Context,
return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _IdentityEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) graphql.Marshaler {
+func (ec *executionContext) _IdentityEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "IdentityEdge",
Field: field,
@@ -5467,10 +6402,14 @@ func (ec *executionContext) _IdentityEdge_cursor(ctx context.Context, field grap
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5483,9 +6422,15 @@ func (ec *executionContext) _IdentityEdge_cursor(ctx context.Context, field grap
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) graphql.Marshaler {
+func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.IdentityEdge) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "IdentityEdge",
Field: field,
@@ -5494,10 +6439,14 @@ func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphq
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5510,9 +6459,15 @@ func (ec *executionContext) _IdentityEdge_node(ctx context.Context, field graphq
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _Label_name(ctx context.Context, field graphql.CollectedField, obj *bug.Label) graphql.Marshaler {
+func (ec *executionContext) _Label_name(ctx context.Context, field graphql.CollectedField, obj *bug.Label) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Label",
Field: field,
@@ -5521,10 +6476,14 @@ func (ec *executionContext) _Label_name(ctx context.Context, field graphql.Colle
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Label().Name(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5537,9 +6496,15 @@ func (ec *executionContext) _Label_name(ctx context.Context, field graphql.Colle
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Label_color(ctx context.Context, field graphql.CollectedField, obj *bug.Label) graphql.Marshaler {
+func (ec *executionContext) _Label_color(ctx context.Context, field graphql.CollectedField, obj *bug.Label) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Label",
Field: field,
@@ -5548,10 +6513,14 @@ func (ec *executionContext) _Label_color(ctx context.Context, field graphql.Coll
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Label().Color(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5564,9 +6533,15 @@ func (ec *executionContext) _Label_color(ctx context.Context, field graphql.Coll
return ec.marshalNColor2ᚖimageᚋcolorᚐRGBA(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeOperation",
Field: field,
@@ -5575,10 +6550,14 @@ func (ec *executionContext) _LabelChangeOperation_hash(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash()
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5591,9 +6570,15 @@ func (ec *executionContext) _LabelChangeOperation_hash(ctx context.Context, fiel
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeOperation",
Field: field,
@@ -5602,10 +6587,14 @@ func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, fi
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5618,9 +6607,15 @@ func (ec *executionContext) _LabelChangeOperation_author(ctx context.Context, fi
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeOperation",
Field: field,
@@ -5629,10 +6624,14 @@ func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.LabelChangeOperation().Date(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5645,9 +6644,15 @@ func (ec *executionContext) _LabelChangeOperation_date(ctx context.Context, fiel
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeOperation",
Field: field,
@@ -5656,10 +6661,14 @@ func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Added, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5672,9 +6681,15 @@ func (ec *executionContext) _LabelChangeOperation_added(ctx context.Context, fie
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeOperation",
Field: field,
@@ -5683,10 +6698,14 @@ func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Removed, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5699,9 +6718,15 @@ func (ec *executionContext) _LabelChangeOperation_removed(ctx context.Context, f
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeResult_label(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeResult) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeResult_label(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeResult) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeResult",
Field: field,
@@ -5710,10 +6735,14 @@ func (ec *executionContext) _LabelChangeResult_label(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Label, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5726,9 +6755,15 @@ func (ec *executionContext) _LabelChangeResult_label(ctx context.Context, field
return ec.marshalNLabel2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeResult_status(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeResult) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeResult_status(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeResult) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeResult",
Field: field,
@@ -5737,10 +6772,14 @@ func (ec *executionContext) _LabelChangeResult_status(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.LabelChangeResult().Status(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5753,9 +6792,15 @@ func (ec *executionContext) _LabelChangeResult_status(ctx context.Context, field
return ec.marshalNLabelChangeStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐLabelChangeStatus(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeTimelineItem",
Field: field,
@@ -5764,10 +6809,14 @@ func (ec *executionContext) _LabelChangeTimelineItem_hash(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5780,9 +6829,15 @@ func (ec *executionContext) _LabelChangeTimelineItem_hash(ctx context.Context, f
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeTimelineItem",
Field: field,
@@ -5791,10 +6846,14 @@ func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5807,9 +6866,15 @@ func (ec *executionContext) _LabelChangeTimelineItem_author(ctx context.Context,
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeTimelineItem",
Field: field,
@@ -5818,10 +6883,14 @@ func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.LabelChangeTimelineItem().Date(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5834,9 +6903,15 @@ func (ec *executionContext) _LabelChangeTimelineItem_date(ctx context.Context, f
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeTimelineItem",
Field: field,
@@ -5845,10 +6920,14 @@ func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Added, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5861,9 +6940,15 @@ func (ec *executionContext) _LabelChangeTimelineItem_added(ctx context.Context,
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res)
}
-func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context, field graphql.CollectedField, obj *bug.LabelChangeTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "LabelChangeTimelineItem",
Field: field,
@@ -5872,10 +6957,14 @@ func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Removed, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5888,9 +6977,15 @@ func (ec *executionContext) _LabelChangeTimelineItem_removed(ctx context.Context
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Mutation",
Field: field,
@@ -5906,10 +7001,14 @@ func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().NewBug(rctx, args["input"].(models.NewBugInput))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5922,9 +7021,15 @@ func (ec *executionContext) _Mutation_newBug(ctx context.Context, field graphql.
return ec.marshalNNewBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐNewBugPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_addComment(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Mutation_addComment(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Mutation",
Field: field,
@@ -5940,10 +7045,14 @@ func (ec *executionContext) _Mutation_addComment(ctx context.Context, field grap
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().AddComment(rctx, args["input"].(models.AddCommentInput))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5956,9 +7065,15 @@ func (ec *executionContext) _Mutation_addComment(ctx context.Context, field grap
return ec.marshalNAddCommentPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐAddCommentPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Mutation",
Field: field,
@@ -5974,10 +7089,14 @@ func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field gr
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().ChangeLabels(rctx, args["input"].(*models.ChangeLabelInput))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -5990,9 +7109,15 @@ func (ec *executionContext) _Mutation_changeLabels(ctx context.Context, field gr
return ec.marshalNChangeLabelPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐChangeLabelPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_openBug(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Mutation_openBug(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Mutation",
Field: field,
@@ -6008,10 +7133,14 @@ func (ec *executionContext) _Mutation_openBug(ctx context.Context, field graphql
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().OpenBug(rctx, args["input"].(models.OpenBugInput))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6024,9 +7153,15 @@ func (ec *executionContext) _Mutation_openBug(ctx context.Context, field graphql
return ec.marshalNOpenBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOpenBugPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_closeBug(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Mutation_closeBug(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Mutation",
Field: field,
@@ -6042,10 +7177,14 @@ func (ec *executionContext) _Mutation_closeBug(ctx context.Context, field graphq
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().CloseBug(rctx, args["input"].(models.CloseBugInput))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6058,9 +7197,15 @@ func (ec *executionContext) _Mutation_closeBug(ctx context.Context, field graphq
return ec.marshalNCloseBugPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCloseBugPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Mutation",
Field: field,
@@ -6076,10 +7221,14 @@ func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphq
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().SetTitle(rctx, args["input"].(models.SetTitleInput))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6092,9 +7241,15 @@ func (ec *executionContext) _Mutation_setTitle(ctx context.Context, field graphq
return ec.marshalNSetTitlePayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐSetTitlePayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_commit(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Mutation_commit(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Mutation",
Field: field,
@@ -6110,10 +7265,14 @@ func (ec *executionContext) _Mutation_commit(ctx context.Context, field graphql.
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().Commit(rctx, args["input"].(models.CommitInput))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6126,9 +7285,15 @@ func (ec *executionContext) _Mutation_commit(ctx context.Context, field graphql.
return ec.marshalNCommitPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommitPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _Mutation_commitAsNeeded(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Mutation_commitAsNeeded(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Mutation",
Field: field,
@@ -6144,10 +7309,14 @@ func (ec *executionContext) _Mutation_commitAsNeeded(ctx context.Context, field
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Mutation().CommitAsNeeded(rctx, args["input"].(models.CommitAsNeededInput))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6160,9 +7329,15 @@ func (ec *executionContext) _Mutation_commitAsNeeded(ctx context.Context, field
return ec.marshalNCommitAsNeededPayload2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐCommitAsNeededPayload(ctx, field.Selections, res)
}
-func (ec *executionContext) _NewBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) graphql.Marshaler {
+func (ec *executionContext) _NewBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "NewBugPayload",
Field: field,
@@ -6171,10 +7346,14 @@ func (ec *executionContext) _NewBugPayload_clientMutationId(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -6184,9 +7363,15 @@ func (ec *executionContext) _NewBugPayload_clientMutationId(ctx context.Context,
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _NewBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) graphql.Marshaler {
+func (ec *executionContext) _NewBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "NewBugPayload",
Field: field,
@@ -6195,10 +7380,14 @@ func (ec *executionContext) _NewBugPayload_bug(ctx context.Context, field graphq
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6211,9 +7400,15 @@ func (ec *executionContext) _NewBugPayload_bug(ctx context.Context, field graphq
return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _NewBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) graphql.Marshaler {
+func (ec *executionContext) _NewBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.NewBugPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "NewBugPayload",
Field: field,
@@ -6222,10 +7417,14 @@ func (ec *executionContext) _NewBugPayload_operation(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6238,9 +7437,15 @@ func (ec *executionContext) _NewBugPayload_operation(ctx context.Context, field
return ec.marshalNCreateOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐCreateOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _OpenBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) graphql.Marshaler {
+func (ec *executionContext) _OpenBugPayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "OpenBugPayload",
Field: field,
@@ -6249,10 +7454,14 @@ func (ec *executionContext) _OpenBugPayload_clientMutationId(ctx context.Context
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -6262,9 +7471,15 @@ func (ec *executionContext) _OpenBugPayload_clientMutationId(ctx context.Context
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _OpenBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) graphql.Marshaler {
+func (ec *executionContext) _OpenBugPayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "OpenBugPayload",
Field: field,
@@ -6273,10 +7488,14 @@ func (ec *executionContext) _OpenBugPayload_bug(ctx context.Context, field graph
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6289,9 +7508,15 @@ func (ec *executionContext) _OpenBugPayload_bug(ctx context.Context, field graph
return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _OpenBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) graphql.Marshaler {
+func (ec *executionContext) _OpenBugPayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.OpenBugPayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "OpenBugPayload",
Field: field,
@@ -6300,10 +7525,14 @@ func (ec *executionContext) _OpenBugPayload_operation(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6316,9 +7545,15 @@ func (ec *executionContext) _OpenBugPayload_operation(ctx context.Context, field
return ec.marshalNSetStatusOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSetStatusOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _OperationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
+func (ec *executionContext) _OperationConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "OperationConnection",
Field: field,
@@ -6327,10 +7562,14 @@ func (ec *executionContext) _OperationConnection_edges(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6343,9 +7582,15 @@ func (ec *executionContext) _OperationConnection_edges(ctx context.Context, fiel
return ec.marshalNOperationEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐOperationEdge(ctx, field.Selections, res)
}
-func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
+func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "OperationConnection",
Field: field,
@@ -6354,10 +7599,14 @@ func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6370,9 +7619,15 @@ func (ec *executionContext) _OperationConnection_nodes(ctx context.Context, fiel
return ec.marshalNOperation2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
+func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "OperationConnection",
Field: field,
@@ -6381,10 +7636,14 @@ func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6397,9 +7656,15 @@ func (ec *executionContext) _OperationConnection_pageInfo(ctx context.Context, f
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) graphql.Marshaler {
+func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.OperationConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "OperationConnection",
Field: field,
@@ -6408,10 +7673,14 @@ func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6424,9 +7693,15 @@ func (ec *executionContext) _OperationConnection_totalCount(ctx context.Context,
return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler {
+func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "OperationEdge",
Field: field,
@@ -6435,10 +7710,14 @@ func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field gra
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6451,9 +7730,15 @@ func (ec *executionContext) _OperationEdge_cursor(ctx context.Context, field gra
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) graphql.Marshaler {
+func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.OperationEdge) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "OperationEdge",
Field: field,
@@ -6462,10 +7747,14 @@ func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graph
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6478,9 +7767,15 @@ func (ec *executionContext) _OperationEdge_node(ctx context.Context, field graph
return ec.marshalNOperation2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
+func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "PageInfo",
Field: field,
@@ -6489,10 +7784,14 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.HasNextPage, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6505,9 +7804,15 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
+func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "PageInfo",
Field: field,
@@ -6516,10 +7821,14 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.HasPreviousPage, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6532,9 +7841,15 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
+func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "PageInfo",
Field: field,
@@ -6543,10 +7858,14 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.StartCursor, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6559,9 +7878,15 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) graphql.Marshaler {
+func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *models.PageInfo) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "PageInfo",
Field: field,
@@ -6570,10 +7895,14 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.EndCursor, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6586,9 +7915,15 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_defaultRepository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Query_defaultRepository(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Query",
Field: field,
@@ -6597,10 +7932,14 @@ func (ec *executionContext) _Query_defaultRepository(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().DefaultRepository(rctx)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -6610,9 +7949,15 @@ func (ec *executionContext) _Query_defaultRepository(ctx context.Context, field
return ec.marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Query_repository(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Query",
Field: field,
@@ -6628,10 +7973,14 @@ func (ec *executionContext) _Query_repository(ctx context.Context, field graphql
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().Repository(rctx, args["ref"].(string))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -6641,9 +7990,15 @@ func (ec *executionContext) _Query_repository(ctx context.Context, field graphql
return ec.marshalORepository2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐRepository(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Query",
Field: field,
@@ -6659,10 +8014,14 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.introspectType(args["name"].(string))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -6672,9 +8031,15 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col
return ec.marshalO__Type2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) graphql.Marshaler {
+func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Query",
Field: field,
@@ -6683,10 +8048,14 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, nil, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.introspectSchema()
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -6696,9 +8065,15 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C
return ec.marshalO__Schema2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
+func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Repository",
Field: field,
@@ -6714,10 +8089,14 @@ func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graph
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Repository().AllBugs(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int), args["query"].(*string))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6730,9 +8109,15 @@ func (ec *executionContext) _Repository_allBugs(ctx context.Context, field graph
return ec.marshalNBugConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐBugConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
+func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Repository",
Field: field,
@@ -6748,10 +8133,14 @@ func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.C
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Repository().Bug(rctx, obj, args["prefix"].(string))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -6761,9 +8150,15 @@ func (ec *executionContext) _Repository_bug(ctx context.Context, field graphql.C
return ec.marshalOBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
+func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Repository",
Field: field,
@@ -6779,10 +8174,14 @@ func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Repository().AllIdentities(rctx, obj, args["after"].(*string), args["before"].(*string), args["first"].(*int), args["last"].(*int))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6795,9 +8194,15 @@ func (ec *executionContext) _Repository_allIdentities(ctx context.Context, field
return ec.marshalNIdentityConnection2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐIdentityConnection(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_identity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
+func (ec *executionContext) _Repository_identity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Repository",
Field: field,
@@ -6813,10 +8218,14 @@ func (ec *executionContext) _Repository_identity(ctx context.Context, field grap
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Repository().Identity(rctx, obj, args["prefix"].(string))
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -6826,9 +8235,15 @@ func (ec *executionContext) _Repository_identity(ctx context.Context, field grap
return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
+func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Repository",
Field: field,
@@ -6837,10 +8252,14 @@ func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Repository().UserIdentity(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -6850,9 +8269,15 @@ func (ec *executionContext) _Repository_userIdentity(ctx context.Context, field
return ec.marshalOIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _Repository_validLabels(ctx context.Context, field graphql.CollectedField, obj *models.Repository) graphql.Marshaler {
+func (ec *executionContext) _Repository_validLabels(ctx context.Context, field graphql.CollectedField, obj *models.Repository) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "Repository",
Field: field,
@@ -6861,10 +8286,14 @@ func (ec *executionContext) _Repository_validLabels(ctx context.Context, field g
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Repository().ValidLabels(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6877,9 +8306,15 @@ func (ec *executionContext) _Repository_validLabels(ctx context.Context, field g
return ec.marshalNLabel2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐLabel(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler {
+func (ec *executionContext) _SetStatusOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetStatusOperation",
Field: field,
@@ -6888,10 +8323,14 @@ func (ec *executionContext) _SetStatusOperation_hash(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash()
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6904,9 +8343,15 @@ func (ec *executionContext) _SetStatusOperation_hash(ctx context.Context, field
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler {
+func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetStatusOperation",
Field: field,
@@ -6915,10 +8360,14 @@ func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6931,9 +8380,15 @@ func (ec *executionContext) _SetStatusOperation_author(ctx context.Context, fiel
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler {
+func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetStatusOperation",
Field: field,
@@ -6942,10 +8397,14 @@ func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusOperation().Date(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6958,9 +8417,15 @@ func (ec *executionContext) _SetStatusOperation_date(ctx context.Context, field
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) graphql.Marshaler {
+func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetStatusOperation",
Field: field,
@@ -6969,10 +8434,14 @@ func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusOperation().Status(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -6985,9 +8454,15 @@ func (ec *executionContext) _SetStatusOperation_status(ctx context.Context, fiel
return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _SetStatusTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetStatusTimelineItem",
Field: field,
@@ -6996,10 +8471,14 @@ func (ec *executionContext) _SetStatusTimelineItem_hash(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7012,9 +8491,15 @@ func (ec *executionContext) _SetStatusTimelineItem_hash(ctx context.Context, fie
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetStatusTimelineItem",
Field: field,
@@ -7023,10 +8508,14 @@ func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7039,9 +8528,15 @@ func (ec *executionContext) _SetStatusTimelineItem_author(ctx context.Context, f
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetStatusTimelineItem",
Field: field,
@@ -7050,10 +8545,14 @@ func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusTimelineItem().Date(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7066,9 +8565,15 @@ func (ec *executionContext) _SetStatusTimelineItem_date(ctx context.Context, fie
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, field graphql.CollectedField, obj *bug.SetStatusTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetStatusTimelineItem",
Field: field,
@@ -7077,10 +8582,14 @@ func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetStatusTimelineItem().Status(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7093,9 +8602,15 @@ func (ec *executionContext) _SetStatusTimelineItem_status(ctx context.Context, f
return ec.marshalNStatus2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐStatus(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler {
+func (ec *executionContext) _SetTitleOperation_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitleOperation",
Field: field,
@@ -7104,10 +8619,14 @@ func (ec *executionContext) _SetTitleOperation_hash(ctx context.Context, field g
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash()
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7120,9 +8639,15 @@ func (ec *executionContext) _SetTitleOperation_hash(ctx context.Context, field g
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler {
+func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitleOperation",
Field: field,
@@ -7131,10 +8656,14 @@ func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7147,9 +8676,15 @@ func (ec *executionContext) _SetTitleOperation_author(ctx context.Context, field
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler {
+func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitleOperation",
Field: field,
@@ -7158,10 +8693,14 @@ func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field g
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetTitleOperation().Date(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7174,9 +8713,15 @@ func (ec *executionContext) _SetTitleOperation_date(ctx context.Context, field g
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler {
+func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitleOperation",
Field: field,
@@ -7185,10 +8730,14 @@ func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Title, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7201,9 +8750,15 @@ func (ec *executionContext) _SetTitleOperation_title(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) graphql.Marshaler {
+func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleOperation) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitleOperation",
Field: field,
@@ -7212,10 +8767,14 @@ func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field gr
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Was, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7228,9 +8787,15 @@ func (ec *executionContext) _SetTitleOperation_was(ctx context.Context, field gr
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitlePayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) graphql.Marshaler {
+func (ec *executionContext) _SetTitlePayload_clientMutationId(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitlePayload",
Field: field,
@@ -7239,10 +8804,14 @@ func (ec *executionContext) _SetTitlePayload_clientMutationId(ctx context.Contex
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.ClientMutationID, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -7252,9 +8821,15 @@ func (ec *executionContext) _SetTitlePayload_clientMutationId(ctx context.Contex
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitlePayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) graphql.Marshaler {
+func (ec *executionContext) _SetTitlePayload_bug(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitlePayload",
Field: field,
@@ -7263,10 +8838,14 @@ func (ec *executionContext) _SetTitlePayload_bug(ctx context.Context, field grap
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Bug, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7279,9 +8858,15 @@ func (ec *executionContext) _SetTitlePayload_bug(ctx context.Context, field grap
return ec.marshalNBug2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSnapshot(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitlePayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) graphql.Marshaler {
+func (ec *executionContext) _SetTitlePayload_operation(ctx context.Context, field graphql.CollectedField, obj *models.SetTitlePayload) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitlePayload",
Field: field,
@@ -7290,10 +8875,14 @@ func (ec *executionContext) _SetTitlePayload_operation(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Operation, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7306,9 +8895,15 @@ func (ec *executionContext) _SetTitlePayload_operation(ctx context.Context, fiel
return ec.marshalNSetTitleOperation2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐSetTitleOperation(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _SetTitleTimelineItem_hash(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitleTimelineItem",
Field: field,
@@ -7317,10 +8912,14 @@ func (ec *executionContext) _SetTitleTimelineItem_hash(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Hash(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7333,9 +8932,15 @@ func (ec *executionContext) _SetTitleTimelineItem_hash(ctx context.Context, fiel
return ec.marshalNHash2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋutilᚋgitᚐHash(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitleTimelineItem",
Field: field,
@@ -7344,10 +8949,14 @@ func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, fi
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Author, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7360,9 +8969,15 @@ func (ec *executionContext) _SetTitleTimelineItem_author(ctx context.Context, fi
return ec.marshalNIdentity2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋidentityᚐInterface(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitleTimelineItem",
Field: field,
@@ -7371,10 +8986,14 @@ func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.SetTitleTimelineItem().Date(rctx, obj)
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7387,9 +9006,15 @@ func (ec *executionContext) _SetTitleTimelineItem_date(ctx context.Context, fiel
return ec.marshalNTime2ᚖtimeᚐTime(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleTimelineItem_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _SetTitleTimelineItem_title(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitleTimelineItem",
Field: field,
@@ -7398,10 +9023,14 @@ func (ec *executionContext) _SetTitleTimelineItem_title(ctx context.Context, fie
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Title, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7414,9 +9043,15 @@ func (ec *executionContext) _SetTitleTimelineItem_title(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) graphql.Marshaler {
+func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field graphql.CollectedField, obj *bug.SetTitleTimelineItem) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "SetTitleTimelineItem",
Field: field,
@@ -7425,10 +9060,14 @@ func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Was, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7441,9 +9080,15 @@ func (ec *executionContext) _SetTitleTimelineItem_was(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler {
+func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "TimelineItemConnection",
Field: field,
@@ -7452,10 +9097,14 @@ func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Edges, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7468,9 +9117,15 @@ func (ec *executionContext) _TimelineItemConnection_edges(ctx context.Context, f
return ec.marshalNTimelineItemEdge2ᚕᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐTimelineItemEdge(ctx, field.Selections, res)
}
-func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler {
+func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "TimelineItemConnection",
Field: field,
@@ -7479,10 +9134,14 @@ func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, f
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Nodes, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7495,9 +9154,15 @@ func (ec *executionContext) _TimelineItemConnection_nodes(ctx context.Context, f
return ec.marshalNTimelineItem2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐTimelineItem(ctx, field.Selections, res)
}
-func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler {
+func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "TimelineItemConnection",
Field: field,
@@ -7506,10 +9171,14 @@ func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PageInfo, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7522,9 +9191,15 @@ func (ec *executionContext) _TimelineItemConnection_pageInfo(ctx context.Context
return ec.marshalNPageInfo2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋgraphqlᚋmodelsᚐPageInfo(ctx, field.Selections, res)
}
-func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) graphql.Marshaler {
+func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemConnection) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "TimelineItemConnection",
Field: field,
@@ -7533,10 +9208,14 @@ func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Conte
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.TotalCount, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7549,9 +9228,15 @@ func (ec *executionContext) _TimelineItemConnection_totalCount(ctx context.Conte
return ec.marshalNInt2int(ctx, field.Selections, res)
}
-func (ec *executionContext) _TimelineItemEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) graphql.Marshaler {
+func (ec *executionContext) _TimelineItemEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "TimelineItemEdge",
Field: field,
@@ -7560,10 +9245,14 @@ func (ec *executionContext) _TimelineItemEdge_cursor(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Cursor, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7576,9 +9265,15 @@ func (ec *executionContext) _TimelineItemEdge_cursor(ctx context.Context, field
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) graphql.Marshaler {
+func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field graphql.CollectedField, obj *models.TimelineItemEdge) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "TimelineItemEdge",
Field: field,
@@ -7587,10 +9282,14 @@ func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field gr
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Node, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7603,9 +9302,15 @@ func (ec *executionContext) _TimelineItemEdge_node(ctx context.Context, field gr
return ec.marshalNTimelineItem2githubᚗcomᚋMichaelMureᚋgitᚑbugᚋbugᚐTimelineItem(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
+func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Directive",
Field: field,
@@ -7614,10 +9319,14 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7630,9 +9339,15 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
+func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Directive",
Field: field,
@@ -7641,10 +9356,14 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Description, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -7654,9 +9373,15 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field
return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
+func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Directive",
Field: field,
@@ -7665,10 +9390,14 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Locations, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7681,9 +9410,15 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr
return ec.marshalN__DirectiveLocation2ᚕstring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) graphql.Marshaler {
+func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Directive",
Field: field,
@@ -7692,10 +9427,14 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Args, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7708,9 +9447,15 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
+func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__EnumValue",
Field: field,
@@ -7719,10 +9464,14 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7735,9 +9484,15 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
+func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__EnumValue",
Field: field,
@@ -7746,10 +9501,14 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Description, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -7759,9 +9518,15 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field
return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
+func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__EnumValue",
Field: field,
@@ -7770,10 +9535,14 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsDeprecated(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7786,9 +9555,15 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) graphql.Marshaler {
+func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__EnumValue",
Field: field,
@@ -7797,10 +9572,14 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context,
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.DeprecationReason(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -7810,9 +9589,15 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context,
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
+func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Field",
Field: field,
@@ -7821,10 +9606,14 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7837,9 +9626,15 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
+func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Field",
Field: field,
@@ -7848,10 +9643,14 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Description, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -7861,9 +9660,15 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap
return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
+func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Field",
Field: field,
@@ -7872,10 +9677,14 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Args, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7888,9 +9697,15 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col
return ec.marshalN__InputValue2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
+func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Field",
Field: field,
@@ -7899,10 +9714,14 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Type, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7915,9 +9734,15 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col
return ec.marshalN__Type2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
+func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Field",
Field: field,
@@ -7926,10 +9751,14 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.IsDeprecated(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7942,9 +9771,15 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) graphql.Marshaler {
+func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Field",
Field: field,
@@ -7953,10 +9788,14 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.DeprecationReason(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -7966,9 +9805,15 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
+func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__InputValue",
Field: field,
@@ -7977,10 +9822,14 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -7993,9 +9842,15 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq
return ec.marshalNString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
+func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__InputValue",
Field: field,
@@ -8004,10 +9859,14 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Description, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8017,9 +9876,15 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field
return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
+func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__InputValue",
Field: field,
@@ -8028,10 +9893,14 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Type, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -8044,9 +9913,15 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq
return ec.marshalN__Type2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) graphql.Marshaler {
+func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__InputValue",
Field: field,
@@ -8055,10 +9930,14 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.DefaultValue, nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8068,9 +9947,15 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
+func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Schema",
Field: field,
@@ -8079,10 +9964,14 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Types(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -8095,9 +9984,15 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C
return ec.marshalN__Type2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
+func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Schema",
Field: field,
@@ -8106,10 +10001,14 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.QueryType(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -8122,9 +10021,15 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph
return ec.marshalN__Type2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
+func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Schema",
Field: field,
@@ -8133,10 +10038,14 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.MutationType(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8146,9 +10055,15 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr
return ec.marshalO__Type2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
+func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Schema",
Field: field,
@@ -8157,10 +10072,14 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.SubscriptionType(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8170,9 +10089,15 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel
return ec.marshalO__Type2ᚖgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) graphql.Marshaler {
+func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Schema",
Field: field,
@@ -8181,10 +10106,14 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Directives(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -8197,9 +10126,15 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap
return ec.marshalN__Directive2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
+func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Type",
Field: field,
@@ -8208,10 +10143,14 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Kind(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
if !ec.HasError(rctx) {
ec.Errorf(ctx, "must not be null")
@@ -8224,9 +10163,15 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll
return ec.marshalN__TypeKind2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
+func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Type",
Field: field,
@@ -8235,10 +10180,14 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Name(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8248,9 +10197,15 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
+func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Type",
Field: field,
@@ -8259,10 +10214,14 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Description(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8272,9 +10231,15 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph
return ec.marshalOString2string(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
+func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Type",
Field: field,
@@ -8290,10 +10255,14 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Fields(args["includeDeprecated"].(bool)), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8303,9 +10272,15 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co
return ec.marshalO__Field2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐField(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
+func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Type",
Field: field,
@@ -8314,10 +10289,14 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Interfaces(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8327,9 +10306,15 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq
return ec.marshalO__Type2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
+func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Type",
Field: field,
@@ -8338,10 +10323,14 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.PossibleTypes(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8351,9 +10340,15 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra
return ec.marshalO__Type2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
+func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Type",
Field: field,
@@ -8369,10 +10364,14 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq
}
rctx.Args = args
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.EnumValues(args["includeDeprecated"].(bool)), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8382,9 +10381,15 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq
return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValue(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
+func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Type",
Field: field,
@@ -8393,10 +10398,14 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.InputFields(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8406,9 +10415,15 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph
return ec.marshalO__InputValue2ᚕgithubᚗcomᚋMichaelMureᚋgitᚑbugᚋvendorᚋgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValue(ctx, field.Selections, res)
}
-func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) graphql.Marshaler {
+func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) {
ctx = ec.Tracer.StartFieldExecution(ctx, field)
- defer func() { ec.Tracer.EndFieldExecution(ctx) }()
+ defer func() {
+ if r := recover(); r != nil {
+ ec.Error(ctx, ec.Recover(ctx, r))
+ ret = graphql.Null
+ }
+ ec.Tracer.EndFieldExecution(ctx)
+ }()
rctx := &graphql.ResolverContext{
Object: "__Type",
Field: field,
@@ -8417,10 +10432,14 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co
}
ctx = graphql.WithResolverContext(ctx, rctx)
ctx = ec.Tracer.StartFieldResolverExecution(ctx, rctx)
- resTmp := ec.FieldMiddleware(ctx, obj, func(rctx context.Context) (interface{}, error) {
+ resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.OfType(), nil
})
+ if err != nil {
+ ec.Error(ctx, err)
+ return graphql.Null
+ }
if resTmp == nil {
return graphql.Null
}
@@ -8434,9 +10453,9 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co
// region **************************** input.gotpl *****************************
-func (ec *executionContext) unmarshalInputAddCommentInput(ctx context.Context, v interface{}) (models.AddCommentInput, error) {
+func (ec *executionContext) unmarshalInputAddCommentInput(ctx context.Context, obj interface{}) (models.AddCommentInput, error) {
var it models.AddCommentInput
- var asMap = v.(map[string]interface{})
+ var asMap = obj.(map[string]interface{})
for k, v := range asMap {
switch k {
@@ -8476,9 +10495,9 @@ func (ec *executionContext) unmarshalInputAddCommentInput(ctx context.Context, v
return it, nil
}
-func (ec *executionContext) unmarshalInputChangeLabelInput(ctx context.Context, v interface{}) (models.ChangeLabelInput, error) {
+func (ec *executionContext) unmarshalInputChangeLabelInput(ctx context.Context, obj interface{}) (models.ChangeLabelInput, error) {
var it models.ChangeLabelInput
- var asMap = v.(map[string]interface{})
+ var asMap = obj.(map[string]interface{})
for k, v := range asMap {
switch k {
@@ -8518,9 +10537,9 @@ func (ec *executionContext) unmarshalInputChangeLabelInput(ctx context.Context,
return it, nil
}
-func (ec *executionContext) unmarshalInputCloseBugInput(ctx context.Context, v interface{}) (models.CloseBugInput, error) {
+func (ec *executionContext) unmarshalInputCloseBugInput(ctx context.Context, obj interface{}) (models.CloseBugInput, error) {
var it models.CloseBugInput
- var asMap = v.(map[string]interface{})
+ var asMap = obj.(map[string]interface{})
for k, v := range asMap {
switch k {
@@ -8548,9 +10567,9 @@ func (ec *executionContext) unmarshalInputCloseBugInput(ctx context.Context, v i
return it, nil
}
-func (ec *executionContext) unmarshalInputCommitAsNeededInput(ctx context.Context, v interface{}) (models.CommitAsNeededInput, error) {
+func (ec *executionContext) unmarshalInputCommitAsNeededInput(ctx context.Context, obj interface{}) (models.CommitAsNeededInput, error) {
var it models.CommitAsNeededInput
- var asMap = v.(map[string]interface{})
+ var asMap = obj.(map[string]interface{})
for k, v := range asMap {
switch k {
@@ -8578,9 +10597,9 @@ func (ec *executionContext) unmarshalInputCommitAsNeededInput(ctx context.Contex
return it, nil
}
-func (ec *executionContext) unmarshalInputCommitInput(ctx context.Context, v interface{}) (models.CommitInput, error) {
+func (ec *executionContext) unmarshalInputCommitInput(ctx context.Context, obj interface{}) (models.CommitInput, error) {
var it models.CommitInput
- var asMap = v.(map[string]interface{})
+ var asMap = obj.(map[string]interface{})
for k, v := range asMap {
switch k {
@@ -8608,9 +10627,9 @@ func (ec *executionContext) unmarshalInputCommitInput(ctx context.Context, v int
return it, nil
}
-func (ec *executionContext) unmarshalInputNewBugInput(ctx context.Context, v interface{}) (models.NewBugInput, error) {
+func (ec *executionContext) unmarshalInputNewBugInput(ctx context.Context, obj interface{}) (models.NewBugInput, error) {
var it models.NewBugInput
- var asMap = v.(map[string]interface{})
+ var asMap = obj.(map[string]interface{})
for k, v := range asMap {
switch k {
@@ -8650,9 +10669,9 @@ func (ec *executionContext) unmarshalInputNewBugInput(ctx context.Context, v int
return it, nil
}
-func (ec *executionContext) unmarshalInputOpenBugInput(ctx context.Context, v interface{}) (models.OpenBugInput, error) {
+func (ec *executionContext) unmarshalInputOpenBugInput(ctx context.Context, obj interface{}) (models.OpenBugInput, error) {
var it models.OpenBugInput
- var asMap = v.(map[string]interface{})
+ var asMap = obj.(map[string]interface{})
for k, v := range asMap {
switch k {
@@ -8680,9 +10699,9 @@ func (ec *executionContext) unmarshalInputOpenBugInput(ctx context.Context, v in
return it, nil
}
-func (ec *executionContext) unmarshalInputSetTitleInput(ctx context.Context, v interface{}) (models.SetTitleInput, error) {
+func (ec *executionContext) unmarshalInputSetTitleInput(ctx context.Context, obj interface{}) (models.SetTitleInput, error) {
var it models.SetTitleInput
- var asMap = v.(map[string]interface{})
+ var asMap = obj.(map[string]interface{})
for k, v := range asMap {
switch k {
diff --git a/vendor/github.com/99designs/gqlgen/cmd/ambient.go b/vendor/github.com/99designs/gqlgen/cmd/ambient.go
deleted file mode 100644
index 7838fdf1..00000000
--- a/vendor/github.com/99designs/gqlgen/cmd/ambient.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package cmd
-
-import (
- // Import and ignore the ambient imports listed below so dependency managers
- // don't prune unused code for us. Both lists should be kept in sync.
- _ "github.com/99designs/gqlgen/graphql"
- _ "github.com/99designs/gqlgen/graphql/introspection"
- _ "github.com/vektah/gqlparser"
- _ "github.com/vektah/gqlparser/ast"
-)
diff --git a/vendor/github.com/99designs/gqlgen/cmd/gen.go b/vendor/github.com/99designs/gqlgen/cmd/gen.go
deleted file mode 100644
index c69858b4..00000000
--- a/vendor/github.com/99designs/gqlgen/cmd/gen.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package cmd
-
-import (
- "fmt"
- "os"
-
- "github.com/99designs/gqlgen/api"
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/pkg/errors"
- "github.com/urfave/cli"
-)
-
-var genCmd = cli.Command{
- Name: "generate",
- Usage: "generate a graphql server based on schema",
- Flags: []cli.Flag{
- cli.BoolFlag{Name: "verbose, v", Usage: "show logs"},
- cli.StringFlag{Name: "config, c", Usage: "the config filename"},
- },
- Action: func(ctx *cli.Context) {
- var cfg *config.Config
- var err error
- if configFilename := ctx.String("config"); configFilename != "" {
- cfg, err = config.LoadConfig(configFilename)
- if err != nil {
- fmt.Fprintln(os.Stderr, err.Error())
- os.Exit(1)
- }
- } else {
- cfg, err = config.LoadConfigFromDefaultLocations()
- if os.IsNotExist(errors.Cause(err)) {
- cfg = config.DefaultConfig()
- } else if err != nil {
- fmt.Fprintln(os.Stderr, err.Error())
- os.Exit(2)
- }
- }
-
- if err = api.Generate(cfg); err != nil {
- fmt.Fprintln(os.Stderr, err.Error())
- os.Exit(3)
- }
- },
-}
diff --git a/vendor/github.com/99designs/gqlgen/cmd/init.go b/vendor/github.com/99designs/gqlgen/cmd/init.go
deleted file mode 100644
index e07bed97..00000000
--- a/vendor/github.com/99designs/gqlgen/cmd/init.go
+++ /dev/null
@@ -1,144 +0,0 @@
-package cmd
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "os"
- "strings"
-
- "github.com/99designs/gqlgen/api"
- "github.com/99designs/gqlgen/plugin/servergen"
-
- "github.com/99designs/gqlgen/codegen/config"
- "github.com/pkg/errors"
- "github.com/urfave/cli"
- yaml "gopkg.in/yaml.v2"
-)
-
-var configComment = `
-# .gqlgen.yml example
-#
-# Refer to https://gqlgen.com/config/
-# for detailed .gqlgen.yml documentation.
-`
-
-var schemaDefault = `
-# GraphQL schema example
-#
-# https://gqlgen.com/getting-started/
-
-type Todo {
- id: ID!
- text: String!
- done: Boolean!
- user: User!
-}
-
-type User {
- id: ID!
- name: String!
-}
-
-type Query {
- todos: [Todo!]!
-}
-
-input NewTodo {
- text: String!
- userId: String!
-}
-
-type Mutation {
- createTodo(input: NewTodo!): Todo!
-}
-`
-
-var initCmd = cli.Command{
- Name: "init",
- Usage: "create a new gqlgen project",
- Flags: []cli.Flag{
- cli.BoolFlag{Name: "verbose, v", Usage: "show logs"},
- cli.StringFlag{Name: "config, c", Usage: "the config filename"},
- cli.StringFlag{Name: "server", Usage: "where to write the server stub to", Value: "server/server.go"},
- cli.StringFlag{Name: "schema", Usage: "where to write the schema stub to", Value: "schema.graphql"},
- },
- Action: func(ctx *cli.Context) {
- initSchema(ctx.String("schema"))
- config := initConfig(ctx)
-
- GenerateGraphServer(config, ctx.String("server"))
- },
-}
-
-func GenerateGraphServer(cfg *config.Config, serverFilename string) {
- err := api.Generate(cfg, api.AddPlugin(servergen.New(serverFilename)))
- if err != nil {
- fmt.Fprintln(os.Stderr, err.Error())
- }
-
- fmt.Fprintf(os.Stdout, "Exec \"go run ./%s\" to start GraphQL server\n", serverFilename)
-}
-
-func initConfig(ctx *cli.Context) *config.Config {
- var cfg *config.Config
- var err error
- configFilename := ctx.String("config")
- if configFilename != "" {
- cfg, err = config.LoadConfig(configFilename)
- } else {
- cfg, err = config.LoadConfigFromDefaultLocations()
- }
-
- if cfg != nil {
- fmt.Fprintf(os.Stderr, "init failed: a configuration file already exists\n")
- os.Exit(1)
- }
-
- if !os.IsNotExist(errors.Cause(err)) {
- fmt.Fprintln(os.Stderr, err.Error())
- os.Exit(1)
- }
-
- if configFilename == "" {
- configFilename = "gqlgen.yml"
- }
- cfg = config.DefaultConfig()
-
- cfg.Resolver = config.PackageConfig{
- Filename: "resolver.go",
- Type: "Resolver",
- }
-
- var buf bytes.Buffer
- buf.WriteString(strings.TrimSpace(configComment))
- buf.WriteString("\n\n")
- var b []byte
- b, err = yaml.Marshal(cfg)
- if err != nil {
- fmt.Fprintln(os.Stderr, "unable to marshal yaml: "+err.Error())
- os.Exit(1)
- }
- buf.Write(b)
-
- err = ioutil.WriteFile(configFilename, buf.Bytes(), 0644)
- if err != nil {
- fmt.Fprintln(os.Stderr, "unable to write cfg file: "+err.Error())
- os.Exit(1)
- }
-
- return cfg
-}
-
-func initSchema(schemaFilename string) {
- _, err := os.Stat(schemaFilename)
- if !os.IsNotExist(err) {
- return
- }
-
- err = ioutil.WriteFile(schemaFilename, []byte(strings.TrimSpace(schemaDefault)), 0644)
- if err != nil {
- fmt.Fprintln(os.Stderr, "unable to write schema file: "+err.Error())
- os.Exit(1)
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/cmd/root.go b/vendor/github.com/99designs/gqlgen/cmd/root.go
deleted file mode 100644
index dc2970ac..00000000
--- a/vendor/github.com/99designs/gqlgen/cmd/root.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package cmd
-
-import (
- "fmt"
- "io/ioutil"
- "log"
- "os"
-
- "github.com/99designs/gqlgen/graphql"
- "github.com/urfave/cli"
-
- // Required since otherwise dep will prune away these unused packages before codegen has a chance to run
- _ "github.com/99designs/gqlgen/handler"
-)
-
-func Execute() {
- app := cli.NewApp()
- app.Name = "gqlgen"
- app.Usage = genCmd.Usage
- app.Description = "This is a library for quickly creating strictly typed graphql servers in golang. See https://gqlgen.com/ for a getting started guide."
- app.HideVersion = true
- app.Flags = genCmd.Flags
- app.Version = graphql.Version
- app.Before = func(context *cli.Context) error {
- if context.Bool("verbose") {
- log.SetFlags(0)
- } else {
- log.SetOutput(ioutil.Discard)
- }
- return nil
- }
-
- app.Action = genCmd.Action
- app.Commands = []cli.Command{
- genCmd,
- initCmd,
- versionCmd,
- }
-
- if err := app.Run(os.Args); err != nil {
- fmt.Fprint(os.Stderr, err.Error())
- os.Exit(1)
- }
-}
diff --git a/vendor/github.com/99designs/gqlgen/cmd/version.go b/vendor/github.com/99designs/gqlgen/cmd/version.go
deleted file mode 100644
index 8b7442d4..00000000
--- a/vendor/github.com/99designs/gqlgen/cmd/version.go
+++ /dev/null
@@ -1,16 +0,0 @@
-package cmd
-
-import (
- "fmt"
-
- "github.com/99designs/gqlgen/graphql"
- "github.com/urfave/cli"
-)
-
-var versionCmd = cli.Command{
- Name: "version",
- Usage: "print the version string",
- Action: func(ctx *cli.Context) {
- fmt.Println(graphql.Version)
- },
-}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/servergen/server.go b/vendor/github.com/99designs/gqlgen/plugin/servergen/server.go
deleted file mode 100644
index 22289c02..00000000
--- a/vendor/github.com/99designs/gqlgen/plugin/servergen/server.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package servergen
-
-import (
- "log"
- "os"
-
- "github.com/99designs/gqlgen/codegen"
- "github.com/99designs/gqlgen/codegen/templates"
- "github.com/99designs/gqlgen/plugin"
- "github.com/pkg/errors"
-)
-
-func New(filename string) plugin.Plugin {
- return &Plugin{filename}
-}
-
-type Plugin struct {
- filename string
-}
-
-var _ plugin.CodeGenerator = &Plugin{}
-
-func (m *Plugin) Name() string {
- return "servergen"
-}
-func (m *Plugin) GenerateCode(data *codegen.Data) error {
- serverBuild := &ServerBuild{
- ExecPackageName: data.Config.Exec.ImportPath(),
- ResolverPackageName: data.Config.Resolver.ImportPath(),
- }
-
- if _, err := os.Stat(m.filename); os.IsNotExist(errors.Cause(err)) {
- return templates.Render(templates.Options{
- PackageName: "main",
- Filename: m.filename,
- Data: serverBuild,
- })
- }
-
- log.Printf("Skipped server: %s already exists\n", m.filename)
- return nil
-}
-
-type ServerBuild struct {
- codegen.Data
-
- ExecPackageName string
- ResolverPackageName string
-}
diff --git a/vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl b/vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl
deleted file mode 100644
index fca71c53..00000000
--- a/vendor/github.com/99designs/gqlgen/plugin/servergen/server.gotpl
+++ /dev/null
@@ -1,20 +0,0 @@
-{{ reserveImport "context" }}
-{{ reserveImport "log" }}
-{{ reserveImport "net/http" }}
-{{ reserveImport "os" }}
-{{ reserveImport "github.com/99designs/gqlgen/handler" }}
-
-const defaultPort = "8080"
-
-func main() {
- port := os.Getenv("PORT")
- if port == "" {
- port = defaultPort
- }
-
- http.Handle("/", handler.Playground("GraphQL playground", "/query"))
- http.Handle("/query", handler.GraphQL({{ lookupImport .ExecPackageName }}.NewExecutableSchema({{ lookupImport .ExecPackageName}}.Config{Resolvers: &{{ lookupImport .ResolverPackageName}}.Resolver{}})))
-
- log.Printf("connect to http://localhost:%s/ for GraphQL playground", port)
- log.Fatal(http.ListenAndServe(":" + port, nil))
-}
diff --git a/vendor/github.com/urfave/cli/.flake8 b/vendor/github.com/urfave/cli/.flake8
deleted file mode 100644
index 6deafc26..00000000
--- a/vendor/github.com/urfave/cli/.flake8
+++ /dev/null
@@ -1,2 +0,0 @@
-[flake8]
-max-line-length = 120
diff --git a/vendor/github.com/urfave/cli/.gitignore b/vendor/github.com/urfave/cli/.gitignore
deleted file mode 100644
index faf70c4c..00000000
--- a/vendor/github.com/urfave/cli/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.coverprofile
-node_modules/
diff --git a/vendor/github.com/urfave/cli/.travis.yml b/vendor/github.com/urfave/cli/.travis.yml
deleted file mode 100644
index cf8d0980..00000000
--- a/vendor/github.com/urfave/cli/.travis.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-language: go
-sudo: false
-dist: trusty
-osx_image: xcode8.3
-go: 1.8.x
-
-os:
-- linux
-- osx
-
-cache:
- directories:
- - node_modules
-
-before_script:
-- go get github.com/urfave/gfmrun/... || true
-- go get golang.org/x/tools/cmd/goimports
-- if [ ! -f node_modules/.bin/markdown-toc ] ; then
- npm install markdown-toc ;
- fi
-
-script:
-- ./runtests gen
-- ./runtests vet
-- ./runtests test
-- ./runtests gfmrun
-- ./runtests toc
diff --git a/vendor/github.com/urfave/cli/CHANGELOG.md b/vendor/github.com/urfave/cli/CHANGELOG.md
deleted file mode 100644
index 401eae5a..00000000
--- a/vendor/github.com/urfave/cli/CHANGELOG.md
+++ /dev/null
@@ -1,435 +0,0 @@
-# Change Log
-
-**ATTN**: This project uses [semantic versioning](http://semver.org/).
-
-## [Unreleased]
-
-## 1.20.0 - 2017-08-10
-
-### Fixed
-
-* `HandleExitCoder` is now correctly iterates over all errors in
- a `MultiError`. The exit code is the exit code of the last error or `1` if
- there are no `ExitCoder`s in the `MultiError`.
-* Fixed YAML file loading on Windows (previously would fail validate the file path)
-* Subcommand `Usage`, `Description`, `ArgsUsage`, `OnUsageError` correctly
- propogated
-* `ErrWriter` is now passed downwards through command structure to avoid the
- need to redefine it
-* Pass `Command` context into `OnUsageError` rather than parent context so that
- all fields are avaiable
-* Errors occuring in `Before` funcs are no longer double printed
-* Use `UsageText` in the help templates for commands and subcommands if
- defined; otherwise build the usage as before (was previously ignoring this
- field)
-* `IsSet` and `GlobalIsSet` now correctly return whether a flag is set if
- a program calls `Set` or `GlobalSet` directly after flag parsing (would
- previously only return `true` if the flag was set during parsing)
-
-### Changed
-
-* No longer exit the program on command/subcommand error if the error raised is
- not an `OsExiter`. This exiting behavior was introduced in 1.19.0, but was
- determined to be a regression in functionality. See [the
- PR](https://github.com/urfave/cli/pull/595) for discussion.
-
-### Added
-
-* `CommandsByName` type was added to make it easy to sort `Command`s by name,
- alphabetically
-* `altsrc` now handles loading of string and int arrays from TOML
-* Support for definition of custom help templates for `App` via
- `CustomAppHelpTemplate`
-* Support for arbitrary key/value fields on `App` to be used with
- `CustomAppHelpTemplate` via `ExtraInfo`
-* `HelpFlag`, `VersionFlag`, and `BashCompletionFlag` changed to explictly be
- `cli.Flag`s allowing for the use of custom flags satisfying the `cli.Flag`
- interface to be used.
-
-
-## [1.19.1] - 2016-11-21
-
-### Fixed
-
-- Fixes regression introduced in 1.19.0 where using an `ActionFunc` as
- the `Action` for a command would cause it to error rather than calling the
- function. Should not have a affected declarative cases using `func(c
- *cli.Context) err)`.
-- Shell completion now handles the case where the user specifies
- `--generate-bash-completion` immediately after a flag that takes an argument.
- Previously it call the application with `--generate-bash-completion` as the
- flag value.
-
-## [1.19.0] - 2016-11-19
-### Added
-- `FlagsByName` was added to make it easy to sort flags (e.g. `sort.Sort(cli.FlagsByName(app.Flags))`)
-- A `Description` field was added to `App` for a more detailed description of
- the application (similar to the existing `Description` field on `Command`)
-- Flag type code generation via `go generate`
-- Write to stderr and exit 1 if action returns non-nil error
-- Added support for TOML to the `altsrc` loader
-- `SkipArgReorder` was added to allow users to skip the argument reordering.
- This is useful if you want to consider all "flags" after an argument as
- arguments rather than flags (the default behavior of the stdlib `flag`
- library). This is backported functionality from the [removal of the flag
- reordering](https://github.com/urfave/cli/pull/398) in the unreleased version
- 2
-- For formatted errors (those implementing `ErrorFormatter`), the errors will
- be formatted during output. Compatible with `pkg/errors`.
-
-### Changed
-- Raise minimum tested/supported Go version to 1.2+
-
-### Fixed
-- Consider empty environment variables as set (previously environment variables
- with the equivalent of `""` would be skipped rather than their value used).
-- Return an error if the value in a given environment variable cannot be parsed
- as the flag type. Previously these errors were silently swallowed.
-- Print full error when an invalid flag is specified (which includes the invalid flag)
-- `App.Writer` defaults to `stdout` when `nil`
-- If no action is specified on a command or app, the help is now printed instead of `panic`ing
-- `App.Metadata` is initialized automatically now (previously was `nil` unless initialized)
-- Correctly show help message if `-h` is provided to a subcommand
-- `context.(Global)IsSet` now respects environment variables. Previously it
- would return `false` if a flag was specified in the environment rather than
- as an argument
-- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
-- `altsrc`s import paths were updated to use `gopkg.in/urfave/cli.v1`. This
- fixes issues that occurred when `gopkg.in/urfave/cli.v1` was imported as well
- as `altsrc` where Go would complain that the types didn't match
-
-## [1.18.1] - 2016-08-28
-### Fixed
-- Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported)
-
-## [1.18.0] - 2016-06-27
-### Added
-- `./runtests` test runner with coverage tracking by default
-- testing on OS X
-- testing on Windows
-- `UintFlag`, `Uint64Flag`, and `Int64Flag` types and supporting code
-
-### Changed
-- Use spaces for alignment in help/usage output instead of tabs, making the
- output alignment consistent regardless of tab width
-
-### Fixed
-- Printing of command aliases in help text
-- Printing of visible flags for both struct and struct pointer flags
-- Display the `help` subcommand when using `CommandCategories`
-- No longer swallows `panic`s that occur within the `Action`s themselves when
- detecting the signature of the `Action` field
-
-## [1.17.1] - 2016-08-28
-### Fixed
-- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
-
-## [1.17.0] - 2016-05-09
-### Added
-- Pluggable flag-level help text rendering via `cli.DefaultFlagStringFunc`
-- `context.GlobalBoolT` was added as an analogue to `context.GlobalBool`
-- Support for hiding commands by setting `Hidden: true` -- this will hide the
- commands in help output
-
-### Changed
-- `Float64Flag`, `IntFlag`, and `DurationFlag` default values are no longer
- quoted in help text output.
-- All flag types now include `(default: {value})` strings following usage when a
- default value can be (reasonably) detected.
-- `IntSliceFlag` and `StringSliceFlag` usage strings are now more consistent
- with non-slice flag types
-- Apps now exit with a code of 3 if an unknown subcommand is specified
- (previously they printed "No help topic for...", but still exited 0. This
- makes it easier to script around apps built using `cli` since they can trust
- that a 0 exit code indicated a successful execution.
-- cleanups based on [Go Report Card
- feedback](https://goreportcard.com/report/github.com/urfave/cli)
-
-## [1.16.1] - 2016-08-28
-### Fixed
-- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
-
-## [1.16.0] - 2016-05-02
-### Added
-- `Hidden` field on all flag struct types to omit from generated help text
-
-### Changed
-- `BashCompletionFlag` (`--enable-bash-completion`) is now omitted from
-generated help text via the `Hidden` field
-
-### Fixed
-- handling of error values in `HandleAction` and `HandleExitCoder`
-
-## [1.15.0] - 2016-04-30
-### Added
-- This file!
-- Support for placeholders in flag usage strings
-- `App.Metadata` map for arbitrary data/state management
-- `Set` and `GlobalSet` methods on `*cli.Context` for altering values after
-parsing.
-- Support for nested lookup of dot-delimited keys in structures loaded from
-YAML.
-
-### Changed
-- The `App.Action` and `Command.Action` now prefer a return signature of
-`func(*cli.Context) error`, as defined by `cli.ActionFunc`. If a non-nil
-`error` is returned, there may be two outcomes:
- - If the error fulfills `cli.ExitCoder`, then `os.Exit` will be called
- automatically
- - Else the error is bubbled up and returned from `App.Run`
-- Specifying an `Action` with the legacy return signature of
-`func(*cli.Context)` will produce a deprecation message to stderr
-- Specifying an `Action` that is not a `func` type will produce a non-zero exit
-from `App.Run`
-- Specifying an `Action` func that has an invalid (input) signature will
-produce a non-zero exit from `App.Run`
-
-### Deprecated
-- <a name="deprecated-cli-app-runandexitonerror"></a>
-`cli.App.RunAndExitOnError`, which should now be done by returning an error
-that fulfills `cli.ExitCoder` to `cli.App.Run`.
-- <a name="deprecated-cli-app-action-signature"></a> the legacy signature for
-`cli.App.Action` of `func(*cli.Context)`, which should now have a return
-signature of `func(*cli.Context) error`, as defined by `cli.ActionFunc`.
-
-### Fixed
-- Added missing `*cli.Context.GlobalFloat64` method
-
-## [1.14.0] - 2016-04-03 (backfilled 2016-04-25)
-### Added
-- Codebeat badge
-- Support for categorization via `CategorizedHelp` and `Categories` on app.
-
-### Changed
-- Use `filepath.Base` instead of `path.Base` in `Name` and `HelpName`.
-
-### Fixed
-- Ensure version is not shown in help text when `HideVersion` set.
-
-## [1.13.0] - 2016-03-06 (backfilled 2016-04-25)
-### Added
-- YAML file input support.
-- `NArg` method on context.
-
-## [1.12.0] - 2016-02-17 (backfilled 2016-04-25)
-### Added
-- Custom usage error handling.
-- Custom text support in `USAGE` section of help output.
-- Improved help messages for empty strings.
-- AppVeyor CI configuration.
-
-### Changed
-- Removed `panic` from default help printer func.
-- De-duping and optimizations.
-
-### Fixed
-- Correctly handle `Before`/`After` at command level when no subcommands.
-- Case of literal `-` argument causing flag reordering.
-- Environment variable hints on Windows.
-- Docs updates.
-
-## [1.11.1] - 2015-12-21 (backfilled 2016-04-25)
-### Changed
-- Use `path.Base` in `Name` and `HelpName`
-- Export `GetName` on flag types.
-
-### Fixed
-- Flag parsing when skipping is enabled.
-- Test output cleanup.
-- Move completion check to account for empty input case.
-
-## [1.11.0] - 2015-11-15 (backfilled 2016-04-25)
-### Added
-- Destination scan support for flags.
-- Testing against `tip` in Travis CI config.
-
-### Changed
-- Go version in Travis CI config.
-
-### Fixed
-- Removed redundant tests.
-- Use correct example naming in tests.
-
-## [1.10.2] - 2015-10-29 (backfilled 2016-04-25)
-### Fixed
-- Remove unused var in bash completion.
-
-## [1.10.1] - 2015-10-21 (backfilled 2016-04-25)
-### Added
-- Coverage and reference logos in README.
-
-### Fixed
-- Use specified values in help and version parsing.
-- Only display app version and help message once.
-
-## [1.10.0] - 2015-10-06 (backfilled 2016-04-25)
-### Added
-- More tests for existing functionality.
-- `ArgsUsage` at app and command level for help text flexibility.
-
-### Fixed
-- Honor `HideHelp` and `HideVersion` in `App.Run`.
-- Remove juvenile word from README.
-
-## [1.9.0] - 2015-09-08 (backfilled 2016-04-25)
-### Added
-- `FullName` on command with accompanying help output update.
-- Set default `$PROG` in bash completion.
-
-### Changed
-- Docs formatting.
-
-### Fixed
-- Removed self-referential imports in tests.
-
-## [1.8.0] - 2015-06-30 (backfilled 2016-04-25)
-### Added
-- Support for `Copyright` at app level.
-- `Parent` func at context level to walk up context lineage.
-
-### Fixed
-- Global flag processing at top level.
-
-## [1.7.1] - 2015-06-11 (backfilled 2016-04-25)
-### Added
-- Aggregate errors from `Before`/`After` funcs.
-- Doc comments on flag structs.
-- Include non-global flags when checking version and help.
-- Travis CI config updates.
-
-### Fixed
-- Ensure slice type flags have non-nil values.
-- Collect global flags from the full command hierarchy.
-- Docs prose.
-
-## [1.7.0] - 2015-05-03 (backfilled 2016-04-25)
-### Changed
-- `HelpPrinter` signature includes output writer.
-
-### Fixed
-- Specify go 1.1+ in docs.
-- Set `Writer` when running command as app.
-
-## [1.6.0] - 2015-03-23 (backfilled 2016-04-25)
-### Added
-- Multiple author support.
-- `NumFlags` at context level.
-- `Aliases` at command level.
-
-### Deprecated
-- `ShortName` at command level.
-
-### Fixed
-- Subcommand help output.
-- Backward compatible support for deprecated `Author` and `Email` fields.
-- Docs regarding `Names`/`Aliases`.
-
-## [1.5.0] - 2015-02-20 (backfilled 2016-04-25)
-### Added
-- `After` hook func support at app and command level.
-
-### Fixed
-- Use parsed context when running command as subcommand.
-- Docs prose.
-
-## [1.4.1] - 2015-01-09 (backfilled 2016-04-25)
-### Added
-- Support for hiding `-h / --help` flags, but not `help` subcommand.
-- Stop flag parsing after `--`.
-
-### Fixed
-- Help text for generic flags to specify single value.
-- Use double quotes in output for defaults.
-- Use `ParseInt` instead of `ParseUint` for int environment var values.
-- Use `0` as base when parsing int environment var values.
-
-## [1.4.0] - 2014-12-12 (backfilled 2016-04-25)
-### Added
-- Support for environment variable lookup "cascade".
-- Support for `Stdout` on app for output redirection.
-
-### Fixed
-- Print command help instead of app help in `ShowCommandHelp`.
-
-## [1.3.1] - 2014-11-13 (backfilled 2016-04-25)
-### Added
-- Docs and example code updates.
-
-### Changed
-- Default `-v / --version` flag made optional.
-
-## [1.3.0] - 2014-08-10 (backfilled 2016-04-25)
-### Added
-- `FlagNames` at context level.
-- Exposed `VersionPrinter` var for more control over version output.
-- Zsh completion hook.
-- `AUTHOR` section in default app help template.
-- Contribution guidelines.
-- `DurationFlag` type.
-
-## [1.2.0] - 2014-08-02
-### Added
-- Support for environment variable defaults on flags plus tests.
-
-## [1.1.0] - 2014-07-15
-### Added
-- Bash completion.
-- Optional hiding of built-in help command.
-- Optional skipping of flag parsing at command level.
-- `Author`, `Email`, and `Compiled` metadata on app.
-- `Before` hook func support at app and command level.
-- `CommandNotFound` func support at app level.
-- Command reference available on context.
-- `GenericFlag` type.
-- `Float64Flag` type.
-- `BoolTFlag` type.
-- `IsSet` flag helper on context.
-- More flag lookup funcs at context level.
-- More tests &amp; docs.
-
-### Changed
-- Help template updates to account for presence/absence of flags.
-- Separated subcommand help template.
-- Exposed `HelpPrinter` var for more control over help output.
-
-## [1.0.0] - 2013-11-01
-### Added
-- `help` flag in default app flag set and each command flag set.
-- Custom handling of argument parsing errors.
-- Command lookup by name at app level.
-- `StringSliceFlag` type and supporting `StringSlice` type.
-- `IntSliceFlag` type and supporting `IntSlice` type.
-- Slice type flag lookups by name at context level.
-- Export of app and command help functions.
-- More tests &amp; docs.
-
-## 0.1.0 - 2013-07-22
-### Added
-- Initial implementation.
-
-[Unreleased]: https://github.com/urfave/cli/compare/v1.18.0...HEAD
-[1.18.0]: https://github.com/urfave/cli/compare/v1.17.0...v1.18.0
-[1.17.0]: https://github.com/urfave/cli/compare/v1.16.0...v1.17.0
-[1.16.0]: https://github.com/urfave/cli/compare/v1.15.0...v1.16.0
-[1.15.0]: https://github.com/urfave/cli/compare/v1.14.0...v1.15.0
-[1.14.0]: https://github.com/urfave/cli/compare/v1.13.0...v1.14.0
-[1.13.0]: https://github.com/urfave/cli/compare/v1.12.0...v1.13.0
-[1.12.0]: https://github.com/urfave/cli/compare/v1.11.1...v1.12.0
-[1.11.1]: https://github.com/urfave/cli/compare/v1.11.0...v1.11.1
-[1.11.0]: https://github.com/urfave/cli/compare/v1.10.2...v1.11.0
-[1.10.2]: https://github.com/urfave/cli/compare/v1.10.1...v1.10.2
-[1.10.1]: https://github.com/urfave/cli/compare/v1.10.0...v1.10.1
-[1.10.0]: https://github.com/urfave/cli/compare/v1.9.0...v1.10.0
-[1.9.0]: https://github.com/urfave/cli/compare/v1.8.0...v1.9.0
-[1.8.0]: https://github.com/urfave/cli/compare/v1.7.1...v1.8.0
-[1.7.1]: https://github.com/urfave/cli/compare/v1.7.0...v1.7.1
-[1.7.0]: https://github.com/urfave/cli/compare/v1.6.0...v1.7.0
-[1.6.0]: https://github.com/urfave/cli/compare/v1.5.0...v1.6.0
-[1.5.0]: https://github.com/urfave/cli/compare/v1.4.1...v1.5.0
-[1.4.1]: https://github.com/urfave/cli/compare/v1.4.0...v1.4.1
-[1.4.0]: https://github.com/urfave/cli/compare/v1.3.1...v1.4.0
-[1.3.1]: https://github.com/urfave/cli/compare/v1.3.0...v1.3.1
-[1.3.0]: https://github.com/urfave/cli/compare/v1.2.0...v1.3.0
-[1.2.0]: https://github.com/urfave/cli/compare/v1.1.0...v1.2.0
-[1.1.0]: https://github.com/urfave/cli/compare/v1.0.0...v1.1.0
-[1.0.0]: https://github.com/urfave/cli/compare/v0.1.0...v1.0.0
diff --git a/vendor/github.com/urfave/cli/LICENSE b/vendor/github.com/urfave/cli/LICENSE
deleted file mode 100644
index 42a597e2..00000000
--- a/vendor/github.com/urfave/cli/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2016 Jeremy Saenz & Contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/vendor/github.com/urfave/cli/README.md b/vendor/github.com/urfave/cli/README.md
deleted file mode 100644
index 2bbbd8ea..00000000
--- a/vendor/github.com/urfave/cli/README.md
+++ /dev/null
@@ -1,1381 +0,0 @@
-cli
-===
-
-[![Build Status](https://travis-ci.org/urfave/cli.svg?branch=master)](https://travis-ci.org/urfave/cli)
-[![Windows Build Status](https://ci.appveyor.com/api/projects/status/rtgk5xufi932pb2v?svg=true)](https://ci.appveyor.com/project/urfave/cli)
-[![GoDoc](https://godoc.org/github.com/urfave/cli?status.svg)](https://godoc.org/github.com/urfave/cli)
-[![codebeat](https://codebeat.co/badges/0a8f30aa-f975-404b-b878-5fab3ae1cc5f)](https://codebeat.co/projects/github-com-urfave-cli)
-[![Go Report Card](https://goreportcard.com/badge/urfave/cli)](https://goreportcard.com/report/urfave/cli)
-[![top level coverage](https://gocover.io/_badge/github.com/urfave/cli?0 "top level coverage")](http://gocover.io/github.com/urfave/cli) /
-[![altsrc coverage](https://gocover.io/_badge/github.com/urfave/cli/altsrc?0 "altsrc coverage")](http://gocover.io/github.com/urfave/cli/altsrc)
-
-**Notice:** This is the library formerly known as
-`github.com/codegangsta/cli` -- Github will automatically redirect requests
-to this repository, but we recommend updating your references for clarity.
-
-cli is a simple, fast, and fun package for building command line apps in Go. The
-goal is to enable developers to write fast and distributable command line
-applications in an expressive way.
-
-<!-- toc -->
-
-- [Overview](#overview)
-- [Installation](#installation)
- * [Supported platforms](#supported-platforms)
- * [Using the `v2` branch](#using-the-v2-branch)
- * [Pinning to the `v1` releases](#pinning-to-the-v1-releases)
-- [Getting Started](#getting-started)
-- [Examples](#examples)
- * [Arguments](#arguments)
- * [Flags](#flags)
- + [Placeholder Values](#placeholder-values)
- + [Alternate Names](#alternate-names)
- + [Ordering](#ordering)
- + [Values from the Environment](#values-from-the-environment)
- + [Values from alternate input sources (YAML, TOML, and others)](#values-from-alternate-input-sources-yaml-toml-and-others)
- * [Subcommands](#subcommands)
- * [Subcommands categories](#subcommands-categories)
- * [Exit code](#exit-code)
- * [Bash Completion](#bash-completion)
- + [Enabling](#enabling)
- + [Distribution](#distribution)
- + [Customization](#customization)
- * [Generated Help Text](#generated-help-text)
- + [Customization](#customization-1)
- * [Version Flag](#version-flag)
- + [Customization](#customization-2)
- + [Full API Example](#full-api-example)
-- [Contribution Guidelines](#contribution-guidelines)
-
-<!-- tocstop -->
-
-## Overview
-
-Command line apps are usually so tiny that there is absolutely no reason why
-your code should *not* be self-documenting. Things like generating help text and
-parsing command flags/options should not hinder productivity when writing a
-command line app.
-
-**This is where cli comes into play.** cli makes command line programming fun,
-organized, and expressive!
-
-## Installation
-
-Make sure you have a working Go environment. Go version 1.2+ is supported. [See
-the install instructions for Go](http://golang.org/doc/install.html).
-
-To install cli, simply run:
-```
-$ go get github.com/urfave/cli
-```
-
-Make sure your `PATH` includes the `$GOPATH/bin` directory so your commands can
-be easily used:
-```
-export PATH=$PATH:$GOPATH/bin
-```
-
-### Supported platforms
-
-cli is tested against multiple versions of Go on Linux, and against the latest
-released version of Go on OS X and Windows. For full details, see
-[`./.travis.yml`](./.travis.yml) and [`./appveyor.yml`](./appveyor.yml).
-
-### Using the `v2` branch
-
-**Warning**: The `v2` branch is currently unreleased and considered unstable.
-
-There is currently a long-lived branch named `v2` that is intended to land as
-the new `master` branch once development there has settled down. The current
-`master` branch (mirrored as `v1`) is being manually merged into `v2` on
-an irregular human-based schedule, but generally if one wants to "upgrade" to
-`v2` *now* and accept the volatility (read: "awesomeness") that comes along with
-that, please use whatever version pinning of your preference, such as via
-`gopkg.in`:
-
-```
-$ go get gopkg.in/urfave/cli.v2
-```
-
-``` go
-...
-import (
- "gopkg.in/urfave/cli.v2" // imports as package "cli"
-)
-...
-```
-
-### Pinning to the `v1` releases
-
-Similarly to the section above describing use of the `v2` branch, if one wants
-to avoid any unexpected compatibility pains once `v2` becomes `master`, then
-pinning to `v1` is an acceptable option, e.g.:
-
-```
-$ go get gopkg.in/urfave/cli.v1
-```
-
-``` go
-...
-import (
- "gopkg.in/urfave/cli.v1" // imports as package "cli"
-)
-...
-```
-
-This will pull the latest tagged `v1` release (e.g. `v1.18.1` at the time of writing).
-
-## Getting Started
-
-One of the philosophies behind cli is that an API should be playful and full of
-discovery. So a cli app can be as little as one line of code in `main()`.
-
-<!-- {
- "args": ["&#45;&#45;help"],
- "output": "A new cli application"
-} -->
-``` go
-package main
-
-import (
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- cli.NewApp().Run(os.Args)
-}
-```
-
-This app will run and show help text, but is not very useful. Let's give an
-action to execute and some help documentation:
-
-<!-- {
- "output": "boom! I say!"
-} -->
-``` go
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
- app.Name = "boom"
- app.Usage = "make an explosive entrance"
- app.Action = func(c *cli.Context) error {
- fmt.Println("boom! I say!")
- return nil
- }
-
- app.Run(os.Args)
-}
-```
-
-Running this already gives you a ton of functionality, plus support for things
-like subcommands and flags, which are covered below.
-
-## Examples
-
-Being a programmer can be a lonely job. Thankfully by the power of automation
-that is not the case! Let's create a greeter app to fend off our demons of
-loneliness!
-
-Start by creating a directory named `greet`, and within it, add a file,
-`greet.go` with the following code in it:
-
-<!-- {
- "output": "Hello friend!"
-} -->
-``` go
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
- app.Name = "greet"
- app.Usage = "fight the loneliness!"
- app.Action = func(c *cli.Context) error {
- fmt.Println("Hello friend!")
- return nil
- }
-
- app.Run(os.Args)
-}
-```
-
-Install our command to the `$GOPATH/bin` directory:
-
-```
-$ go install
-```
-
-Finally run our new command:
-
-```
-$ greet
-Hello friend!
-```
-
-cli also generates neat help text:
-
-```
-$ greet help
-NAME:
- greet - fight the loneliness!
-
-USAGE:
- greet [global options] command [command options] [arguments...]
-
-VERSION:
- 0.0.0
-
-COMMANDS:
- help, h Shows a list of commands or help for one command
-
-GLOBAL OPTIONS
- --version Shows version information
-```
-
-### Arguments
-
-You can lookup arguments by calling the `Args` function on `cli.Context`, e.g.:
-
-<!-- {
- "output": "Hello \""
-} -->
-``` go
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
-
- app.Action = func(c *cli.Context) error {
- fmt.Printf("Hello %q", c.Args().Get(0))
- return nil
- }
-
- app.Run(os.Args)
-}
-```
-
-### Flags
-
-Setting and querying flags is simple.
-
-<!-- {
- "output": "Hello Nefertiti"
-} -->
-``` go
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
-
- app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang",
- Value: "english",
- Usage: "language for the greeting",
- },
- }
-
- app.Action = func(c *cli.Context) error {
- name := "Nefertiti"
- if c.NArg() > 0 {
- name = c.Args().Get(0)
- }
- if c.String("lang") == "spanish" {
- fmt.Println("Hola", name)
- } else {
- fmt.Println("Hello", name)
- }
- return nil
- }
-
- app.Run(os.Args)
-}
-```
-
-You can also set a destination variable for a flag, to which the content will be
-scanned.
-
-<!-- {
- "output": "Hello someone"
-} -->
-``` go
-package main
-
-import (
- "os"
- "fmt"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- var language string
-
- app := cli.NewApp()
-
- app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang",
- Value: "english",
- Usage: "language for the greeting",
- Destination: &language,
- },
- }
-
- app.Action = func(c *cli.Context) error {
- name := "someone"
- if c.NArg() > 0 {
- name = c.Args()[0]
- }
- if language == "spanish" {
- fmt.Println("Hola", name)
- } else {
- fmt.Println("Hello", name)
- }
- return nil
- }
-
- app.Run(os.Args)
-}
-```
-
-See full list of flags at http://godoc.org/github.com/urfave/cli
-
-#### Placeholder Values
-
-Sometimes it's useful to specify a flag's value within the usage string itself.
-Such placeholders are indicated with back quotes.
-
-For example this:
-
-<!-- {
- "args": ["&#45;&#45;help"],
- "output": "&#45;&#45;config FILE, &#45;c FILE"
-} -->
-```go
-package main
-
-import (
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
-
- app.Flags = []cli.Flag{
- cli.StringFlag{
- Name: "config, c",
- Usage: "Load configuration from `FILE`",
- },
- }
-
- app.Run(os.Args)
-}
-```
-
-Will result in help output like:
-
-```
---config FILE, -c FILE Load configuration from FILE
-```
-
-Note that only the first placeholder is used. Subsequent back-quoted words will
-be left as-is.
-
-#### Alternate Names
-
-You can set alternate (or short) names for flags by providing a comma-delimited
-list for the `Name`. e.g.
-
-<!-- {
- "args": ["&#45;&#45;help"],
- "output": "&#45;&#45;lang value, &#45;l value.*language for the greeting.*default: \"english\""
-} -->
-``` go
-package main
-
-import (
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
-
- app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang, l",
- Value: "english",
- Usage: "language for the greeting",
- },
- }
-
- app.Run(os.Args)
-}
-```
-
-That flag can then be set with `--lang spanish` or `-l spanish`. Note that
-giving two different forms of the same flag in the same command invocation is an
-error.
-
-#### Ordering
-
-Flags for the application and commands are shown in the order they are defined.
-However, it's possible to sort them from outside this library by using `FlagsByName`
-or `CommandsByName` with `sort`.
-
-For example this:
-
-<!-- {
- "args": ["&#45;&#45;help"],
- "output": "add a task to the list\n.*complete a task on the list\n.*\n\n.*\n.*Load configuration from FILE\n.*Language for the greeting.*"
-} -->
-``` go
-package main
-
-import (
- "os"
- "sort"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
-
- app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang, l",
- Value: "english",
- Usage: "Language for the greeting",
- },
- cli.StringFlag{
- Name: "config, c",
- Usage: "Load configuration from `FILE`",
- },
- }
-
- app.Commands = []cli.Command{
- {
- Name: "complete",
- Aliases: []string{"c"},
- Usage: "complete a task on the list",
- Action: func(c *cli.Context) error {
- return nil
- },
- },
- {
- Name: "add",
- Aliases: []string{"a"},
- Usage: "add a task to the list",
- Action: func(c *cli.Context) error {
- return nil
- },
- },
- }
-
- sort.Sort(cli.FlagsByName(app.Flags))
- sort.Sort(cli.CommandsByName(app.Commands))
-
- app.Run(os.Args)
-}
-```
-
-Will result in help output like:
-
-```
---config FILE, -c FILE Load configuration from FILE
---lang value, -l value Language for the greeting (default: "english")
-```
-
-#### Values from the Environment
-
-You can also have the default value set from the environment via `EnvVar`. e.g.
-
-<!-- {
- "args": ["&#45;&#45;help"],
- "output": "language for the greeting.*APP_LANG"
-} -->
-``` go
-package main
-
-import (
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
-
- app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang, l",
- Value: "english",
- Usage: "language for the greeting",
- EnvVar: "APP_LANG",
- },
- }
-
- app.Run(os.Args)
-}
-```
-
-The `EnvVar` may also be given as a comma-delimited "cascade", where the first
-environment variable that resolves is used as the default.
-
-<!-- {
- "args": ["&#45;&#45;help"],
- "output": "language for the greeting.*LEGACY_COMPAT_LANG.*APP_LANG.*LANG"
-} -->
-``` go
-package main
-
-import (
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
-
- app.Flags = []cli.Flag {
- cli.StringFlag{
- Name: "lang, l",
- Value: "english",
- Usage: "language for the greeting",
- EnvVar: "LEGACY_COMPAT_LANG,APP_LANG,LANG",
- },
- }
-
- app.Run(os.Args)
-}
-```
-
-#### Values from alternate input sources (YAML, TOML, and others)
-
-There is a separate package altsrc that adds support for getting flag values
-from other file input sources.
-
-Currently supported input source formats:
-* YAML
-* TOML
-
-In order to get values for a flag from an alternate input source the following
-code would be added to wrap an existing cli.Flag like below:
-
-``` go
- altsrc.NewIntFlag(cli.IntFlag{Name: "test"})
-```
-
-Initialization must also occur for these flags. Below is an example initializing
-getting data from a yaml file below.
-
-``` go
- command.Before = altsrc.InitInputSourceWithContext(command.Flags, NewYamlSourceFromFlagFunc("load"))
-```
-
-The code above will use the "load" string as a flag name to get the file name of
-a yaml file from the cli.Context. It will then use that file name to initialize
-the yaml input source for any flags that are defined on that command. As a note
-the "load" flag used would also have to be defined on the command flags in order
-for this code snipped to work.
-
-Currently only the aboved specified formats are supported but developers can
-add support for other input sources by implementing the
-altsrc.InputSourceContext for their given sources.
-
-Here is a more complete sample of a command using YAML support:
-
-<!-- {
- "args": ["test-cmd", "&#45;&#45;help"],
- "output": "&#45&#45;test value.*default: 0"
-} -->
-``` go
-package notmain
-
-import (
- "fmt"
- "os"
-
- "github.com/urfave/cli"
- "github.com/urfave/cli/altsrc"
-)
-
-func main() {
- app := cli.NewApp()
-
- flags := []cli.Flag{
- altsrc.NewIntFlag(cli.IntFlag{Name: "test"}),
- cli.StringFlag{Name: "load"},
- }
-
- app.Action = func(c *cli.Context) error {
- fmt.Println("yaml ist rad")
- return nil
- }
-
- app.Before = altsrc.InitInputSourceWithContext(flags, altsrc.NewYamlSourceFromFlagFunc("load"))
- app.Flags = flags
-
- app.Run(os.Args)
-}
-```
-
-### Subcommands
-
-Subcommands can be defined for a more git-like command line app.
-
-<!-- {
- "args": ["template", "add"],
- "output": "new task template: .+"
-} -->
-```go
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
-
- app.Commands = []cli.Command{
- {
- Name: "add",
- Aliases: []string{"a"},
- Usage: "add a task to the list",
- Action: func(c *cli.Context) error {
- fmt.Println("added task: ", c.Args().First())
- return nil
- },
- },
- {
- Name: "complete",
- Aliases: []string{"c"},
- Usage: "complete a task on the list",
- Action: func(c *cli.Context) error {
- fmt.Println("completed task: ", c.Args().First())
- return nil
- },
- },
- {
- Name: "template",
- Aliases: []string{"t"},
- Usage: "options for task templates",
- Subcommands: []cli.Command{
- {
- Name: "add",
- Usage: "add a new template",
- Action: func(c *cli.Context) error {
- fmt.Println("new task template: ", c.Args().First())
- return nil
- },
- },
- {
- Name: "remove",
- Usage: "remove an existing template",
- Action: func(c *cli.Context) error {
- fmt.Println("removed task template: ", c.Args().First())
- return nil
- },
- },
- },
- },
- }
-
- app.Run(os.Args)
-}
-```
-
-### Subcommands categories
-
-For additional organization in apps that have many subcommands, you can
-associate a category for each command to group them together in the help
-output.
-
-E.g.
-
-```go
-package main
-
-import (
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
-
- app.Commands = []cli.Command{
- {
- Name: "noop",
- },
- {
- Name: "add",
- Category: "template",
- },
- {
- Name: "remove",
- Category: "template",
- },
- }
-
- app.Run(os.Args)
-}
-```
-
-Will include:
-
-```
-COMMANDS:
- noop
-
- Template actions:
- add
- remove
-```
-
-### Exit code
-
-Calling `App.Run` will not automatically call `os.Exit`, which means that by
-default the exit code will "fall through" to being `0`. An explicit exit code
-may be set by returning a non-nil error that fulfills `cli.ExitCoder`, *or* a
-`cli.MultiError` that includes an error that fulfills `cli.ExitCoder`, e.g.:
-
-``` go
-package main
-
-import (
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- app := cli.NewApp()
- app.Flags = []cli.Flag{
- cli.BoolTFlag{
- Name: "ginger-crouton",
- Usage: "is it in the soup?",
- },
- }
- app.Action = func(ctx *cli.Context) error {
- if !ctx.Bool("ginger-crouton") {
- return cli.NewExitError("it is not in the soup", 86)
- }
- return nil
- }
-
- app.Run(os.Args)
-}
-```
-
-### Bash Completion
-
-You can enable completion commands by setting the `EnableBashCompletion`
-flag on the `App` object. By default, this setting will only auto-complete to
-show an app's subcommands, but you can write your own completion methods for
-the App or its subcommands.
-
-<!-- {
- "args": ["complete", "&#45;&#45;generate&#45;bash&#45;completion"],
- "output": "laundry"
-} -->
-``` go
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- tasks := []string{"cook", "clean", "laundry", "eat", "sleep", "code"}
-
- app := cli.NewApp()
- app.EnableBashCompletion = true
- app.Commands = []cli.Command{
- {
- Name: "complete",
- Aliases: []string{"c"},
- Usage: "complete a task on the list",
- Action: func(c *cli.Context) error {
- fmt.Println("completed task: ", c.Args().First())
- return nil
- },
- BashComplete: func(c *cli.Context) {
- // This will complete if no args are passed
- if c.NArg() > 0 {
- return
- }
- for _, t := range tasks {
- fmt.Println(t)
- }
- },
- },
- }
-
- app.Run(os.Args)
-}
-```
-
-#### Enabling
-
-Source the `autocomplete/bash_autocomplete` file in your `.bashrc` file while
-setting the `PROG` variable to the name of your program:
-
-`PROG=myprogram source /.../cli/autocomplete/bash_autocomplete`
-
-#### Distribution
-
-Copy `autocomplete/bash_autocomplete` into `/etc/bash_completion.d/` and rename
-it to the name of the program you wish to add autocomplete support for (or
-automatically install it there if you are distributing a package). Don't forget
-to source the file to make it active in the current shell.
-
-```
-sudo cp src/bash_autocomplete /etc/bash_completion.d/<myprogram>
-source /etc/bash_completion.d/<myprogram>
-```
-
-Alternatively, you can just document that users should source the generic
-`autocomplete/bash_autocomplete` in their bash configuration with `$PROG` set
-to the name of their program (as above).
-
-#### Customization
-
-The default bash completion flag (`--generate-bash-completion`) is defined as
-`cli.BashCompletionFlag`, and may be redefined if desired, e.g.:
-
-<!-- {
- "args": ["&#45;&#45;compgen"],
- "output": "wat\nhelp\nh"
-} -->
-``` go
-package main
-
-import (
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- cli.BashCompletionFlag = cli.BoolFlag{
- Name: "compgen",
- Hidden: true,
- }
-
- app := cli.NewApp()
- app.EnableBashCompletion = true
- app.Commands = []cli.Command{
- {
- Name: "wat",
- },
- }
- app.Run(os.Args)
-}
-```
-
-### Generated Help Text
-
-The default help flag (`-h/--help`) is defined as `cli.HelpFlag` and is checked
-by the cli internals in order to print generated help text for the app, command,
-or subcommand, and break execution.
-
-#### Customization
-
-All of the help text generation may be customized, and at multiple levels. The
-templates are exposed as variables `AppHelpTemplate`, `CommandHelpTemplate`, and
-`SubcommandHelpTemplate` which may be reassigned or augmented, and full override
-is possible by assigning a compatible func to the `cli.HelpPrinter` variable,
-e.g.:
-
-<!-- {
- "output": "Ha HA. I pwnd the help!!1"
-} -->
-``` go
-package main
-
-import (
- "fmt"
- "io"
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- // EXAMPLE: Append to an existing template
- cli.AppHelpTemplate = fmt.Sprintf(`%s
-
-WEBSITE: http://awesometown.example.com
-
-SUPPORT: support@awesometown.example.com
-
-`, cli.AppHelpTemplate)
-
- // EXAMPLE: Override a template
- cli.AppHelpTemplate = `NAME:
- {{.Name}} - {{.Usage}}
-USAGE:
- {{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}
- {{if len .Authors}}
-AUTHOR:
- {{range .Authors}}{{ . }}{{end}}
- {{end}}{{if .Commands}}
-COMMANDS:
-{{range .Commands}}{{if not .HideHelp}} {{join .Names ", "}}{{ "\t"}}{{.Usage}}{{ "\n" }}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
-GLOBAL OPTIONS:
- {{range .VisibleFlags}}{{.}}
- {{end}}{{end}}{{if .Copyright }}
-COPYRIGHT:
- {{.Copyright}}
- {{end}}{{if .Version}}
-VERSION:
- {{.Version}}
- {{end}}
-`
-
- // EXAMPLE: Replace the `HelpPrinter` func
- cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) {
- fmt.Println("Ha HA. I pwnd the help!!1")
- }
-
- cli.NewApp().Run(os.Args)
-}
-```
-
-The default flag may be customized to something other than `-h/--help` by
-setting `cli.HelpFlag`, e.g.:
-
-<!-- {
- "args": ["&#45;&#45halp"],
- "output": "haaaaalp.*HALP"
-} -->
-``` go
-package main
-
-import (
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- cli.HelpFlag = cli.BoolFlag{
- Name: "halp, haaaaalp",
- Usage: "HALP",
- EnvVar: "SHOW_HALP,HALPPLZ",
- }
-
- cli.NewApp().Run(os.Args)
-}
-```
-
-### Version Flag
-
-The default version flag (`-v/--version`) is defined as `cli.VersionFlag`, which
-is checked by the cli internals in order to print the `App.Version` via
-`cli.VersionPrinter` and break execution.
-
-#### Customization
-
-The default flag may be customized to something other than `-v/--version` by
-setting `cli.VersionFlag`, e.g.:
-
-<!-- {
- "args": ["&#45;&#45print-version"],
- "output": "partay version 19\\.99\\.0"
-} -->
-``` go
-package main
-
-import (
- "os"
-
- "github.com/urfave/cli"
-)
-
-func main() {
- cli.VersionFlag = cli.BoolFlag{
- Name: "print-version, V",
- Usage: "print only the version",
- }
-
- app := cli.NewApp()
- app.Name = "partay"
- app.Version = "19.99.0"
- app.Run(os.Args)
-}
-```
-
-Alternatively, the version printer at `cli.VersionPrinter` may be overridden, e.g.:
-
-<!-- {
- "args": ["&#45;&#45version"],
- "output": "version=19\\.99\\.0 revision=fafafaf"
-} -->
-``` go
-package main
-
-import (
- "fmt"
- "os"
-
- "github.com/urfave/cli"
-)
-
-var (
- Revision = "fafafaf"
-)
-
-func main() {
- cli.VersionPrinter = func(c *cli.Context) {
- fmt.Printf("version=%s revision=%s\n", c.App.Version, Revision)
- }
-
- app := cli.NewApp()
- app.Name = "partay"
- app.Version = "19.99.0"
- app.Run(os.Args)
-}
-```
-
-#### Full API Example
-
-**Notice**: This is a contrived (functioning) example meant strictly for API
-demonstration purposes. Use of one's imagination is encouraged.
-
-<!-- {
- "output": "made it!\nPhew!"
-} -->
-``` go
-package main
-
-import (
- "errors"
- "flag"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "time"
-
- "github.com/urfave/cli"
-)
-
-func init() {
- cli.AppHelpTemplate += "\nCUSTOMIZED: you bet ur muffins\n"
- cli.CommandHelpTemplate += "\nYMMV\n"
- cli.SubcommandHelpTemplate += "\nor something\n"
-
- cli.HelpFlag = cli.BoolFlag{Name: "halp"}
- cli.BashCompletionFlag = cli.BoolFlag{Name: "compgen", Hidden: true}
- cli.VersionFlag = cli.BoolFlag{Name: "print-version, V"}
-
- cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) {
- fmt.Fprintf(w, "best of luck to you\n")
- }
- cli.VersionPrinter = func(c *cli.Context) {
- fmt.Fprintf(c.App.Writer, "version=%s\n", c.App.Version)
- }
- cli.OsExiter = func(c int) {
- fmt.Fprintf(cli.ErrWriter, "refusing to exit %d\n", c)
- }
- cli.ErrWriter = ioutil.Discard
- cli.FlagStringer = func(fl cli.Flag) string {
- return fmt.Sprintf("\t\t%s", fl.GetName())
- }
-}
-
-type hexWriter struct{}
-
-func (w *hexWriter) Write(p []byte) (int, error) {
- for _, b := range p {
- fmt.Printf("%x", b)
- }
- fmt.Printf("\n")
-
- return len(p), nil
-}
-
-type genericType struct{
- s string
-}
-
-func (g *genericType) Set(value string) error {
- g.s = value
- return nil
-}
-
-func (g *genericType) String() string {
- return g.s
-}
-
-func main() {
- app := cli.NewApp()
- app.Name = "kənˈtrīv"
- app.Version = "19.99.0"
- app.Compiled = time.Now()
- app.Authors = []cli.Author{
- cli.Author{
- Name: "Example Human",
- Email: "human@example.com",
- },
- }
- app.Copyright = "(c) 1999 Serious Enterprise"
- app.HelpName = "contrive"
- app.Usage = "demonstrate available API"
- app.UsageText = "contrive - demonstrating the available API"
- app.ArgsUsage = "[args and such]"
- app.Commands = []cli.Command{
- cli.Command{
- Name: "doo",
- Aliases: []string{"do"},
- Category: "motion",
- Usage: "do the doo",
- UsageText: "doo - does the dooing",
- Description: "no really, there is a lot of dooing to be done",
- ArgsUsage: "[arrgh]",
- Flags: []cli.Flag{
- cli.BoolFlag{Name: "forever, forevvarr"},
- },
- Subcommands: cli.Commands{
- cli.Command{
- Name: "wop",
- Action: wopAction,
- },
- },
- SkipFlagParsing: false,
- HideHelp: false,
- Hidden: false,
- HelpName: "doo!",
- BashComplete: func(c *cli.Context) {
- fmt.Fprintf(c.App.Writer, "--better\n")
- },
- Before: func(c *cli.Context) error {
- fmt.Fprintf(c.App.Writer, "brace for impact\n")
- return nil
- },
- After: func(c *cli.Context) error {
- fmt.Fprintf(c.App.Writer, "did we lose anyone?\n")
- return nil
- },
- Action: func(c *cli.Context) error {
- c.Command.FullName()
- c.Command.HasName("wop")
- c.Command.Names()
- c.Command.VisibleFlags()
- fmt.Fprintf(c.App.Writer, "dodododododoodododddooooododododooo\n")
- if c.Bool("forever") {
- c.Command.Run(c)
- }
- return nil
- },
- OnUsageError: func(c *cli.Context, err error, isSubcommand bool) error {
- fmt.Fprintf(c.App.Writer, "for shame\n")
- return err
- },
- },
- }
- app.Flags = []cli.Flag{
- cli.BoolFlag{Name: "fancy"},
- cli.BoolTFlag{Name: "fancier"},
- cli.DurationFlag{Name: "howlong, H", Value: time.Second * 3},
- cli.Float64Flag{Name: "howmuch"},
- cli.GenericFlag{Name: "wat", Value: &genericType{}},
- cli.Int64Flag{Name: "longdistance"},
- cli.Int64SliceFlag{Name: "intervals"},
- cli.IntFlag{Name: "distance"},
- cli.IntSliceFlag{Name: "times"},
- cli.StringFlag{Name: "dance-move, d"},
- cli.StringSliceFlag{Name: "names, N"},
- cli.UintFlag{Name: "age"},
- cli.Uint64Flag{Name: "bigage"},
- }
- app.EnableBashCompletion = true
- app.HideHelp = false
- app.HideVersion = false
- app.BashComplete = func(c *cli.Context) {
- fmt.Fprintf(c.App.Writer, "lipstick\nkiss\nme\nlipstick\nringo\n")
- }
- app.Before = func(c *cli.Context) error {
- fmt.Fprintf(c.App.Writer, "HEEEERE GOES\n")
- return nil
- }
- app.After = func(c *cli.Context) error {
- fmt.Fprintf(c.App.Writer, "Phew!\n")
- return nil
- }
- app.CommandNotFound = func(c *cli.Context, command string) {
- fmt.Fprintf(c.App.Writer, "Thar be no %q here.\n", command)
- }
- app.OnUsageError = func(c *cli.Context, err error, isSubcommand bool) error {
- if isSubcommand {
- return err
- }
-
- fmt.Fprintf(c.App.Writer, "WRONG: %#v\n", err)
- return nil
- }
- app.Action = func(c *cli.Context) error {
- cli.DefaultAppComplete(c)
- cli.HandleExitCoder(errors.New("not an exit coder, though"))
- cli.ShowAppHelp(c)
- cli.ShowCommandCompletions(c, "nope")
- cli.ShowCommandHelp(c, "also-nope")
- cli.ShowCompletions(c)
- cli.ShowSubcommandHelp(c)
- cli.ShowVersion(c)
-
- categories := c.App.Categories()
- categories.AddCommand("sounds", cli.Command{
- Name: "bloop",
- })
-
- for _, category := range c.App.Categories() {
- fmt.Fprintf(c.App.Writer, "%s\n", category.Name)
- fmt.Fprintf(c.App.Writer, "%#v\n", category.Commands)
- fmt.Fprintf(c.App.Writer, "%#v\n", category.VisibleCommands())
- }
-
- fmt.Printf("%#v\n", c.App.Command("doo"))
- if c.Bool("infinite") {
- c.App.Run([]string{"app", "doo", "wop"})
- }
-
- if c.Bool("forevar") {
- c.App.RunAsSubcommand(c)
- }
- c.App.Setup()
- fmt.Printf("%#v\n", c.App.VisibleCategories())
- fmt.Printf("%#v\n", c.App.VisibleCommands())
- fmt.Printf("%#v\n", c.App.VisibleFlags())
-
- fmt.Printf("%#v\n", c.Args().First())
- if len(c.Args()) > 0 {
- fmt.Printf("%#v\n", c.Args()[1])
- }
- fmt.Printf("%#v\n", c.Args().Present())
- fmt.Printf("%#v\n", c.Args().Tail())
-
- set := flag.NewFlagSet("contrive", 0)
- nc := cli.NewContext(c.App, set, c)
-
- fmt.Printf("%#v\n", nc.Args())
- fmt.Printf("%#v\n", nc.Bool("nope"))
- fmt.Printf("%#v\n", nc.BoolT("nerp"))
- fmt.Printf("%#v\n", nc.Duration("howlong"))
- fmt.Printf("%#v\n", nc.Float64("hay"))
- fmt.Printf("%#v\n", nc.Generic("bloop"))
- fmt.Printf("%#v\n", nc.Int64("bonk"))
- fmt.Printf("%#v\n", nc.Int64Slice("burnks"))
- fmt.Printf("%#v\n", nc.Int("bips"))
- fmt.Printf("%#v\n", nc.IntSlice("blups"))
- fmt.Printf("%#v\n", nc.String("snurt"))
- fmt.Printf("%#v\n", nc.StringSlice("snurkles"))
- fmt.Printf("%#v\n", nc.Uint("flub"))
- fmt.Printf("%#v\n", nc.Uint64("florb"))
- fmt.Printf("%#v\n", nc.GlobalBool("global-nope"))
- fmt.Printf("%#v\n", nc.GlobalBoolT("global-nerp"))
- fmt.Printf("%#v\n", nc.GlobalDuration("global-howlong"))
- fmt.Printf("%#v\n", nc.GlobalFloat64("global-hay"))
- fmt.Printf("%#v\n", nc.GlobalGeneric("global-bloop"))
- fmt.Printf("%#v\n", nc.GlobalInt("global-bips"))
- fmt.Printf("%#v\n", nc.GlobalIntSlice("global-blups"))
- fmt.Printf("%#v\n", nc.GlobalString("global-snurt"))
- fmt.Printf("%#v\n", nc.GlobalStringSlice("global-snurkles"))
-
- fmt.Printf("%#v\n", nc.FlagNames())
- fmt.Printf("%#v\n", nc.GlobalFlagNames())
- fmt.Printf("%#v\n", nc.GlobalIsSet("wat"))
- fmt.Printf("%#v\n", nc.GlobalSet("wat", "nope"))
- fmt.Printf("%#v\n", nc.NArg())
- fmt.Printf("%#v\n", nc.NumFlags())
- fmt.Printf("%#v\n", nc.Parent())
-
- nc.Set("wat", "also-nope")
-
- ec := cli.NewExitError("ohwell", 86)
- fmt.Fprintf(c.App.Writer, "%d", ec.ExitCode())
- fmt.Printf("made it!\n")
- return ec
- }
-
- if os.Getenv("HEXY") != "" {
- app.Writer = &hexWriter{}
- app.ErrWriter = &hexWriter{}
- }
-
- app.Metadata = map[string]interface{}{
- "layers": "many",
- "explicable": false,
- "whatever-values": 19.99,
- }
-
- app.Run(os.Args)
-}
-
-func wopAction(c *cli.Context) error {
- fmt.Fprintf(c.App.Writer, ":wave: over here, eh\n")
- return nil
-}
-```
-
-## Contribution Guidelines
-
-Feel free to put up a pull request to fix a bug or maybe add a feature. I will
-give it a code review and make sure that it does not break backwards
-compatibility. If I or any other collaborators agree that it is in line with
-the vision of the project, we will work with you to get the code into
-a mergeable state and merge it into the master branch.
-
-If you have contributed something significant to the project, we will most
-likely add you as a collaborator. As a collaborator you are given the ability
-to merge others pull requests. It is very important that new code does not
-break existing code, so be careful about what code you do choose to merge.
-
-If you feel like you have contributed to the project but have not yet been
-added as a collaborator, we probably forgot to add you, please open an issue.
diff --git a/vendor/github.com/urfave/cli/app.go b/vendor/github.com/urfave/cli/app.go
deleted file mode 100644
index 51fc45d8..00000000
--- a/vendor/github.com/urfave/cli/app.go
+++ /dev/null
@@ -1,497 +0,0 @@
-package cli
-
-import (
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "path/filepath"
- "sort"
- "time"
-)
-
-var (
- changeLogURL = "https://github.com/urfave/cli/blob/master/CHANGELOG.md"
- appActionDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-action-signature", changeLogURL)
- runAndExitOnErrorDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-runandexitonerror", changeLogURL)
-
- contactSysadmin = "This is an error in the application. Please contact the distributor of this application if this is not you."
-
- errInvalidActionType = NewExitError("ERROR invalid Action type. "+
- fmt.Sprintf("Must be `func(*Context`)` or `func(*Context) error). %s", contactSysadmin)+
- fmt.Sprintf("See %s", appActionDeprecationURL), 2)
-)
-
-// App is the main structure of a cli application. It is recommended that
-// an app be created with the cli.NewApp() function
-type App struct {
- // The name of the program. Defaults to path.Base(os.Args[0])
- Name string
- // Full name of command for help, defaults to Name
- HelpName string
- // Description of the program.
- Usage string
- // Text to override the USAGE section of help
- UsageText string
- // Description of the program argument format.
- ArgsUsage string
- // Version of the program
- Version string
- // Description of the program
- Description string
- // List of commands to execute
- Commands []Command
- // List of flags to parse
- Flags []Flag
- // Boolean to enable bash completion commands
- EnableBashCompletion bool
- // Boolean to hide built-in help command
- HideHelp bool
- // Boolean to hide built-in version flag and the VERSION section of help
- HideVersion bool
- // Populate on app startup, only gettable through method Categories()
- categories CommandCategories
- // An action to execute when the bash-completion flag is set
- BashComplete BashCompleteFunc
- // An action to execute before any subcommands are run, but after the context is ready
- // If a non-nil error is returned, no subcommands are run
- Before BeforeFunc
- // An action to execute after any subcommands are run, but after the subcommand has finished
- // It is run even if Action() panics
- After AfterFunc
-
- // The action to execute when no subcommands are specified
- // Expects a `cli.ActionFunc` but will accept the *deprecated* signature of `func(*cli.Context) {}`
- // *Note*: support for the deprecated `Action` signature will be removed in a future version
- Action interface{}
-
- // Execute this function if the proper command cannot be found
- CommandNotFound CommandNotFoundFunc
- // Execute this function if an usage error occurs
- OnUsageError OnUsageErrorFunc
- // Compilation date
- Compiled time.Time
- // List of all authors who contributed
- Authors []Author
- // Copyright of the binary if any
- Copyright string
- // Name of Author (Note: Use App.Authors, this is deprecated)
- Author string
- // Email of Author (Note: Use App.Authors, this is deprecated)
- Email string
- // Writer writer to write output to
- Writer io.Writer
- // ErrWriter writes error output
- ErrWriter io.Writer
- // Other custom info
- Metadata map[string]interface{}
- // Carries a function which returns app specific info.
- ExtraInfo func() map[string]string
- // CustomAppHelpTemplate the text template for app help topic.
- // cli.go uses text/template to render templates. You can
- // render custom help text by setting this variable.
- CustomAppHelpTemplate string
-
- didSetup bool
-}
-
-// Tries to find out when this binary was compiled.
-// Returns the current time if it fails to find it.
-func compileTime() time.Time {
- info, err := os.Stat(os.Args[0])
- if err != nil {
- return time.Now()
- }
- return info.ModTime()
-}
-
-// NewApp creates a new cli Application with some reasonable defaults for Name,
-// Usage, Version and Action.
-func NewApp() *App {
- return &App{
- Name: filepath.Base(os.Args[0]),
- HelpName: filepath.Base(os.Args[0]),
- Usage: "A new cli application",
- UsageText: "",
- Version: "0.0.0",
- BashComplete: DefaultAppComplete,
- Action: helpCommand.Action,
- Compiled: compileTime(),
- Writer: os.Stdout,
- }
-}
-
-// Setup runs initialization code to ensure all data structures are ready for
-// `Run` or inspection prior to `Run`. It is internally called by `Run`, but
-// will return early if setup has already happened.
-func (a *App) Setup() {
- if a.didSetup {
- return
- }
-
- a.didSetup = true
-
- if a.Author != "" || a.Email != "" {
- a.Authors = append(a.Authors, Author{Name: a.Author, Email: a.Email})
- }
-
- newCmds := []Command{}
- for _, c := range a.Commands {
- if c.HelpName == "" {
- c.HelpName = fmt.Sprintf("%s %s", a.HelpName, c.Name)
- }
- newCmds = append(newCmds, c)
- }
- a.Commands = newCmds
-
- if a.Command(helpCommand.Name) == nil && !a.HideHelp {
- a.Commands = append(a.Commands, helpCommand)
- if (HelpFlag != BoolFlag{}) {
- a.appendFlag(HelpFlag)
- }
- }
-
- if !a.HideVersion {
- a.appendFlag(VersionFlag)
- }
-
- a.categories = CommandCategories{}
- for _, command := range a.Commands {
- a.categories = a.categories.AddCommand(command.Category, command)
- }
- sort.Sort(a.categories)
-
- if a.Metadata == nil {
- a.Metadata = make(map[string]interface{})
- }
-
- if a.Writer == nil {
- a.Writer = os.Stdout
- }
-}
-
-// Run is the entry point to the cli app. Parses the arguments slice and routes
-// to the proper flag/args combination
-func (a *App) Run(arguments []string) (err error) {
- a.Setup()
-
- // handle the completion flag separately from the flagset since
- // completion could be attempted after a flag, but before its value was put
- // on the command line. this causes the flagset to interpret the completion
- // flag name as the value of the flag before it which is undesirable
- // note that we can only do this because the shell autocomplete function
- // always appends the completion flag at the end of the command
- shellComplete, arguments := checkShellCompleteFlag(a, arguments)
-
- // parse flags
- set, err := flagSet(a.Name, a.Flags)
- if err != nil {
- return err
- }
-
- set.SetOutput(ioutil.Discard)
- err = set.Parse(arguments[1:])
- nerr := normalizeFlags(a.Flags, set)
- context := NewContext(a, set, nil)
- if nerr != nil {
- fmt.Fprintln(a.Writer, nerr)
- ShowAppHelp(context)
- return nerr
- }
- context.shellComplete = shellComplete
-
- if checkCompletions(context) {
- return nil
- }
-
- if err != nil {
- if a.OnUsageError != nil {
- err := a.OnUsageError(context, err, false)
- HandleExitCoder(err)
- return err
- }
- fmt.Fprintf(a.Writer, "%s %s\n\n", "Incorrect Usage.", err.Error())
- ShowAppHelp(context)
- return err
- }
-
- if !a.HideHelp && checkHelp(context) {
- ShowAppHelp(context)
- return nil
- }
-
- if !a.HideVersion && checkVersion(context) {
- ShowVersion(context)
- return nil
- }
-
- if a.After != nil {
- defer func() {
- if afterErr := a.After(context); afterErr != nil {
- if err != nil {
- err = NewMultiError(err, afterErr)
- } else {
- err = afterErr
- }
- }
- }()
- }
-
- if a.Before != nil {
- beforeErr := a.Before(context)
- if beforeErr != nil {
- ShowAppHelp(context)
- HandleExitCoder(beforeErr)
- err = beforeErr
- return err
- }
- }
-
- args := context.Args()
- if args.Present() {
- name := args.First()
- c := a.Command(name)
- if c != nil {
- return c.Run(context)
- }
- }
-
- if a.Action == nil {
- a.Action = helpCommand.Action
- }
-
- // Run default Action
- err = HandleAction(a.Action, context)
-
- HandleExitCoder(err)
- return err
-}
-
-// RunAndExitOnError calls .Run() and exits non-zero if an error was returned
-//
-// Deprecated: instead you should return an error that fulfills cli.ExitCoder
-// to cli.App.Run. This will cause the application to exit with the given eror
-// code in the cli.ExitCoder
-func (a *App) RunAndExitOnError() {
- if err := a.Run(os.Args); err != nil {
- fmt.Fprintln(a.errWriter(), err)
- OsExiter(1)
- }
-}
-
-// RunAsSubcommand invokes the subcommand given the context, parses ctx.Args() to
-// generate command-specific flags
-func (a *App) RunAsSubcommand(ctx *Context) (err error) {
- // append help to commands
- if len(a.Commands) > 0 {
- if a.Command(helpCommand.Name) == nil && !a.HideHelp {
- a.Commands = append(a.Commands, helpCommand)
- if (HelpFlag != BoolFlag{}) {
- a.appendFlag(HelpFlag)
- }
- }
- }
-
- newCmds := []Command{}
- for _, c := range a.Commands {
- if c.HelpName == "" {
- c.HelpName = fmt.Sprintf("%s %s", a.HelpName, c.Name)
- }
- newCmds = append(newCmds, c)
- }
- a.Commands = newCmds
-
- // parse flags
- set, err := flagSet(a.Name, a.Flags)
- if err != nil {
- return err
- }
-
- set.SetOutput(ioutil.Discard)
- err = set.Parse(ctx.Args().Tail())
- nerr := normalizeFlags(a.Flags, set)
- context := NewContext(a, set, ctx)
-
- if nerr != nil {
- fmt.Fprintln(a.Writer, nerr)
- fmt.Fprintln(a.Writer)
- if len(a.Commands) > 0 {
- ShowSubcommandHelp(context)
- } else {
- ShowCommandHelp(ctx, context.Args().First())
- }
- return nerr
- }
-
- if checkCompletions(context) {
- return nil
- }
-
- if err != nil {
- if a.OnUsageError != nil {
- err = a.OnUsageError(context, err, true)
- HandleExitCoder(err)
- return err
- }
- fmt.Fprintf(a.Writer, "%s %s\n\n", "Incorrect Usage.", err.Error())
- ShowSubcommandHelp(context)
- return err
- }
-
- if len(a.Commands) > 0 {
- if checkSubcommandHelp(context) {
- return nil
- }
- } else {
- if checkCommandHelp(ctx, context.Args().First()) {
- return nil
- }
- }
-
- if a.After != nil {
- defer func() {
- afterErr := a.After(context)
- if afterErr != nil {
- HandleExitCoder(err)
- if err != nil {
- err = NewMultiError(err, afterErr)
- } else {
- err = afterErr
- }
- }
- }()
- }
-
- if a.Before != nil {
- beforeErr := a.Before(context)
- if beforeErr != nil {
- HandleExitCoder(beforeErr)
- err = beforeErr
- return err
- }
- }
-
- args := context.Args()
- if args.Present() {
- name := args.First()
- c := a.Command(name)
- if c != nil {
- return c.Run(context)
- }
- }
-
- // Run default Action
- err = HandleAction(a.Action, context)
-
- HandleExitCoder(err)
- return err
-}
-
-// Command returns the named command on App. Returns nil if the command does not exist
-func (a *App) Command(name string) *Command {
- for _, c := range a.Commands {
- if c.HasName(name) {
- return &c
- }
- }
-
- return nil
-}
-
-// Categories returns a slice containing all the categories with the commands they contain
-func (a *App) Categories() CommandCategories {
- return a.categories
-}
-
-// VisibleCategories returns a slice of categories and commands that are
-// Hidden=false
-func (a *App) VisibleCategories() []*CommandCategory {
- ret := []*CommandCategory{}
- for _, category := range a.categories {
- if visible := func() *CommandCategory {
- for _, command := range category.Commands {
- if !command.Hidden {
- return category
- }
- }
- return nil
- }(); visible != nil {
- ret = append(ret, visible)
- }
- }
- return ret
-}
-
-// VisibleCommands returns a slice of the Commands with Hidden=false
-func (a *App) VisibleCommands() []Command {
- ret := []Command{}
- for _, command := range a.Commands {
- if !command.Hidden {
- ret = append(ret, command)
- }
- }
- return ret
-}
-
-// VisibleFlags returns a slice of the Flags with Hidden=false
-func (a *App) VisibleFlags() []Flag {
- return visibleFlags(a.Flags)
-}
-
-func (a *App) hasFlag(flag Flag) bool {
- for _, f := range a.Flags {
- if flag == f {
- return true
- }
- }
-
- return false
-}
-
-func (a *App) errWriter() io.Writer {
-
- // When the app ErrWriter is nil use the package level one.
- if a.ErrWriter == nil {
- return ErrWriter
- }
-
- return a.ErrWriter
-}
-
-func (a *App) appendFlag(flag Flag) {
- if !a.hasFlag(flag) {
- a.Flags = append(a.Flags, flag)
- }
-}
-
-// Author represents someone who has contributed to a cli project.
-type Author struct {
- Name string // The Authors name
- Email string // The Authors email
-}
-
-// String makes Author comply to the Stringer interface, to allow an easy print in the templating process
-func (a Author) String() string {
- e := ""
- if a.Email != "" {
- e = " <" + a.Email + ">"
- }
-
- return fmt.Sprintf("%v%v", a.Name, e)
-}
-
-// HandleAction attempts to figure out which Action signature was used. If
-// it's an ActionFunc or a func with the legacy signature for Action, the func
-// is run!
-func HandleAction(action interface{}, context *Context) (err error) {
- if a, ok := action.(ActionFunc); ok {
- return a(context)
- } else if a, ok := action.(func(*Context) error); ok {
- return a(context)
- } else if a, ok := action.(func(*Context)); ok { // deprecated function signature
- a(context)
- return nil
- } else {
- return errInvalidActionType
- }
-}
diff --git a/vendor/github.com/urfave/cli/appveyor.yml b/vendor/github.com/urfave/cli/appveyor.yml
deleted file mode 100644
index 1e1489c3..00000000
--- a/vendor/github.com/urfave/cli/appveyor.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-version: "{build}"
-
-os: Windows Server 2016
-
-image: Visual Studio 2017
-
-clone_folder: c:\gopath\src\github.com\urfave\cli
-
-environment:
- GOPATH: C:\gopath
- GOVERSION: 1.8.x
- PYTHON: C:\Python36-x64
- PYTHON_VERSION: 3.6.x
- PYTHON_ARCH: 64
-
-install:
-- set PATH=%GOPATH%\bin;C:\go\bin;%PATH%
-- go version
-- go env
-- go get github.com/urfave/gfmrun/...
-- go get -v -t ./...
-
-build_script:
-- python runtests vet
-- python runtests test
-- python runtests gfmrun
diff --git a/vendor/github.com/urfave/cli/category.go b/vendor/github.com/urfave/cli/category.go
deleted file mode 100644
index 1a605502..00000000
--- a/vendor/github.com/urfave/cli/category.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package cli
-
-// CommandCategories is a slice of *CommandCategory.
-type CommandCategories []*CommandCategory
-
-// CommandCategory is a category containing commands.
-type CommandCategory struct {
- Name string
- Commands Commands
-}
-
-func (c CommandCategories) Less(i, j int) bool {
- return c[i].Name < c[j].Name
-}
-
-func (c CommandCategories) Len() int {
- return len(c)
-}
-
-func (c CommandCategories) Swap(i, j int) {
- c[i], c[j] = c[j], c[i]
-}
-
-// AddCommand adds a command to a category.
-func (c CommandCategories) AddCommand(category string, command Command) CommandCategories {
- for _, commandCategory := range c {
- if commandCategory.Name == category {
- commandCategory.Commands = append(commandCategory.Commands, command)
- return c
- }
- }
- return append(c, &CommandCategory{Name: category, Commands: []Command{command}})
-}
-
-// VisibleCommands returns a slice of the Commands with Hidden=false
-func (c *CommandCategory) VisibleCommands() []Command {
- ret := []Command{}
- for _, command := range c.Commands {
- if !command.Hidden {
- ret = append(ret, command)
- }
- }
- return ret
-}
diff --git a/vendor/github.com/urfave/cli/cli.go b/vendor/github.com/urfave/cli/cli.go
deleted file mode 100644
index 90c07eb8..00000000
--- a/vendor/github.com/urfave/cli/cli.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Package cli provides a minimal framework for creating and organizing command line
-// Go applications. cli is designed to be easy to understand and write, the most simple
-// cli application can be written as follows:
-// func main() {
-// cli.NewApp().Run(os.Args)
-// }
-//
-// Of course this application does not do much, so let's make this an actual application:
-// func main() {
-// app := cli.NewApp()
-// app.Name = "greet"
-// app.Usage = "say a greeting"
-// app.Action = func(c *cli.Context) error {
-// println("Greetings")
-// return nil
-// }
-//
-// app.Run(os.Args)
-// }
-package cli
-
-//go:generate python ./generate-flag-types cli -i flag-types.json -o flag_generated.go
diff --git a/vendor/github.com/urfave/cli/command.go b/vendor/github.com/urfave/cli/command.go
deleted file mode 100644
index 23de2944..00000000
--- a/vendor/github.com/urfave/cli/command.go
+++ /dev/null
@@ -1,304 +0,0 @@
-package cli
-
-import (
- "fmt"
- "io/ioutil"
- "sort"
- "strings"
-)
-
-// Command is a subcommand for a cli.App.
-type Command struct {
- // The name of the command
- Name string
- // short name of the command. Typically one character (deprecated, use `Aliases`)
- ShortName string
- // A list of aliases for the command
- Aliases []string
- // A short description of the usage of this command
- Usage string
- // Custom text to show on USAGE section of help
- UsageText string
- // A longer explanation of how the command works
- Description string
- // A short description of the arguments of this command
- ArgsUsage string
- // The category the command is part of
- Category string
- // The function to call when checking for bash command completions
- BashComplete BashCompleteFunc
- // An action to execute before any sub-subcommands are run, but after the context is ready
- // If a non-nil error is returned, no sub-subcommands are run
- Before BeforeFunc
- // An action to execute after any subcommands are run, but after the subcommand has finished
- // It is run even if Action() panics
- After AfterFunc
- // The function to call when this command is invoked
- Action interface{}
- // TODO: replace `Action: interface{}` with `Action: ActionFunc` once some kind
- // of deprecation period has passed, maybe?
-
- // Execute this function if a usage error occurs.
- OnUsageError OnUsageErrorFunc
- // List of child commands
- Subcommands Commands
- // List of flags to parse
- Flags []Flag
- // Treat all flags as normal arguments if true
- SkipFlagParsing bool
- // Skip argument reordering which attempts to move flags before arguments,
- // but only works if all flags appear after all arguments. This behavior was
- // removed n version 2 since it only works under specific conditions so we
- // backport here by exposing it as an option for compatibility.
- SkipArgReorder bool
- // Boolean to hide built-in help command
- HideHelp bool
- // Boolean to hide this command from help or completion
- Hidden bool
-
- // Full name of command for help, defaults to full command name, including parent commands.
- HelpName string
- commandNamePath []string
-
- // CustomHelpTemplate the text template for the command help topic.
- // cli.go uses text/template to render templates. You can
- // render custom help text by setting this variable.
- CustomHelpTemplate string
-}
-
-type CommandsByName []Command
-
-func (c CommandsByName) Len() int {
- return len(c)
-}
-
-func (c CommandsByName) Less(i, j int) bool {
- return c[i].Name < c[j].Name
-}
-
-func (c CommandsByName) Swap(i, j int) {
- c[i], c[j] = c[j], c[i]
-}
-
-// FullName returns the full name of the command.
-// For subcommands this ensures that parent commands are part of the command path
-func (c Command) FullName() string {
- if c.commandNamePath == nil {
- return c.Name
- }
- return strings.Join(c.commandNamePath, " ")
-}
-
-// Commands is a slice of Command
-type Commands []Command
-
-// Run invokes the command given the context, parses ctx.Args() to generate command-specific flags
-func (c Command) Run(ctx *Context) (err error) {
- if len(c.Subcommands) > 0 {
- return c.startApp(ctx)
- }
-
- if !c.HideHelp && (HelpFlag != BoolFlag{}) {
- // append help to flags
- c.Flags = append(
- c.Flags,
- HelpFlag,
- )
- }
-
- set, err := flagSet(c.Name, c.Flags)
- if err != nil {
- return err
- }
- set.SetOutput(ioutil.Discard)
-
- if c.SkipFlagParsing {
- err = set.Parse(append([]string{"--"}, ctx.Args().Tail()...))
- } else if !c.SkipArgReorder {
- firstFlagIndex := -1
- terminatorIndex := -1
- for index, arg := range ctx.Args() {
- if arg == "--" {
- terminatorIndex = index
- break
- } else if arg == "-" {
- // Do nothing. A dash alone is not really a flag.
- continue
- } else if strings.HasPrefix(arg, "-") && firstFlagIndex == -1 {
- firstFlagIndex = index
- }
- }
-
- if firstFlagIndex > -1 {
- args := ctx.Args()
- regularArgs := make([]string, len(args[1:firstFlagIndex]))
- copy(regularArgs, args[1:firstFlagIndex])
-
- var flagArgs []string
- if terminatorIndex > -1 {
- flagArgs = args[firstFlagIndex:terminatorIndex]
- regularArgs = append(regularArgs, args[terminatorIndex:]...)
- } else {
- flagArgs = args[firstFlagIndex:]
- }
-
- err = set.Parse(append(flagArgs, regularArgs...))
- } else {
- err = set.Parse(ctx.Args().Tail())
- }
- } else {
- err = set.Parse(ctx.Args().Tail())
- }
-
- nerr := normalizeFlags(c.Flags, set)
- if nerr != nil {
- fmt.Fprintln(ctx.App.Writer, nerr)
- fmt.Fprintln(ctx.App.Writer)
- ShowCommandHelp(ctx, c.Name)
- return nerr
- }
-
- context := NewContext(ctx.App, set, ctx)
- context.Command = c
- if checkCommandCompletions(context, c.Name) {
- return nil
- }
-
- if err != nil {
- if c.OnUsageError != nil {
- err := c.OnUsageError(context, err, false)
- HandleExitCoder(err)
- return err
- }
- fmt.Fprintln(context.App.Writer, "Incorrect Usage:", err.Error())
- fmt.Fprintln(context.App.Writer)
- ShowCommandHelp(context, c.Name)
- return err
- }
-
- if checkCommandHelp(context, c.Name) {
- return nil
- }
-
- if c.After != nil {
- defer func() {
- afterErr := c.After(context)
- if afterErr != nil {
- HandleExitCoder(err)
- if err != nil {
- err = NewMultiError(err, afterErr)
- } else {
- err = afterErr
- }
- }
- }()
- }
-
- if c.Before != nil {
- err = c.Before(context)
- if err != nil {
- ShowCommandHelp(context, c.Name)
- HandleExitCoder(err)
- return err
- }
- }
-
- if c.Action == nil {
- c.Action = helpSubcommand.Action
- }
-
- err = HandleAction(c.Action, context)
-
- if err != nil {
- HandleExitCoder(err)
- }
- return err
-}
-
-// Names returns the names including short names and aliases.
-func (c Command) Names() []string {
- names := []string{c.Name}
-
- if c.ShortName != "" {
- names = append(names, c.ShortName)
- }
-
- return append(names, c.Aliases...)
-}
-
-// HasName returns true if Command.Name or Command.ShortName matches given name
-func (c Command) HasName(name string) bool {
- for _, n := range c.Names() {
- if n == name {
- return true
- }
- }
- return false
-}
-
-func (c Command) startApp(ctx *Context) error {
- app := NewApp()
- app.Metadata = ctx.App.Metadata
- // set the name and usage
- app.Name = fmt.Sprintf("%s %s", ctx.App.Name, c.Name)
- if c.HelpName == "" {
- app.HelpName = c.HelpName
- } else {
- app.HelpName = app.Name
- }
-
- app.Usage = c.Usage
- app.Description = c.Description
- app.ArgsUsage = c.ArgsUsage
-
- // set CommandNotFound
- app.CommandNotFound = ctx.App.CommandNotFound
- app.CustomAppHelpTemplate = c.CustomHelpTemplate
-
- // set the flags and commands
- app.Commands = c.Subcommands
- app.Flags = c.Flags
- app.HideHelp = c.HideHelp
-
- app.Version = ctx.App.Version
- app.HideVersion = ctx.App.HideVersion
- app.Compiled = ctx.App.Compiled
- app.Author = ctx.App.Author
- app.Email = ctx.App.Email
- app.Writer = ctx.App.Writer
- app.ErrWriter = ctx.App.ErrWriter
-
- app.categories = CommandCategories{}
- for _, command := range c.Subcommands {
- app.categories = app.categories.AddCommand(command.Category, command)
- }
-
- sort.Sort(app.categories)
-
- // bash completion
- app.EnableBashCompletion = ctx.App.EnableBashCompletion
- if c.BashComplete != nil {
- app.BashComplete = c.BashComplete
- }
-
- // set the actions
- app.Before = c.Before
- app.After = c.After
- if c.Action != nil {
- app.Action = c.Action
- } else {
- app.Action = helpSubcommand.Action
- }
- app.OnUsageError = c.OnUsageError
-
- for index, cc := range app.Commands {
- app.Commands[index].commandNamePath = []string{c.Name, cc.Name}
- }
-
- return app.RunAsSubcommand(ctx)
-}
-
-// VisibleFlags returns a slice of the Flags with Hidden=false
-func (c Command) VisibleFlags() []Flag {
- return visibleFlags(c.Flags)
-}
diff --git a/vendor/github.com/urfave/cli/context.go b/vendor/github.com/urfave/cli/context.go
deleted file mode 100644
index db94191e..00000000
--- a/vendor/github.com/urfave/cli/context.go
+++ /dev/null
@@ -1,278 +0,0 @@
-package cli
-
-import (
- "errors"
- "flag"
- "reflect"
- "strings"
- "syscall"
-)
-
-// Context is a type that is passed through to
-// each Handler action in a cli application. Context
-// can be used to retrieve context-specific Args and
-// parsed command-line options.
-type Context struct {
- App *App
- Command Command
- shellComplete bool
- flagSet *flag.FlagSet
- setFlags map[string]bool
- parentContext *Context
-}
-
-// NewContext creates a new context. For use in when invoking an App or Command action.
-func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context {
- c := &Context{App: app, flagSet: set, parentContext: parentCtx}
-
- if parentCtx != nil {
- c.shellComplete = parentCtx.shellComplete
- }
-
- return c
-}
-
-// NumFlags returns the number of flags set
-func (c *Context) NumFlags() int {
- return c.flagSet.NFlag()
-}
-
-// Set sets a context flag to a value.
-func (c *Context) Set(name, value string) error {
- c.setFlags = nil
- return c.flagSet.Set(name, value)
-}
-
-// GlobalSet sets a context flag to a value on the global flagset
-func (c *Context) GlobalSet(name, value string) error {
- globalContext(c).setFlags = nil
- return globalContext(c).flagSet.Set(name, value)
-}
-
-// IsSet determines if the flag was actually set
-func (c *Context) IsSet(name string) bool {
- if c.setFlags == nil {
- c.setFlags = make(map[string]bool)
-
- c.flagSet.Visit(func(f *flag.Flag) {
- c.setFlags[f.Name] = true
- })
-
- c.flagSet.VisitAll(func(f *flag.Flag) {
- if _, ok := c.setFlags[f.Name]; ok {
- return
- }
- c.setFlags[f.Name] = false
- })
-
- // XXX hack to support IsSet for flags with EnvVar
- //
- // There isn't an easy way to do this with the current implementation since
- // whether a flag was set via an environment variable is very difficult to
- // determine here. Instead, we intend to introduce a backwards incompatible
- // change in version 2 to add `IsSet` to the Flag interface to push the
- // responsibility closer to where the information required to determine
- // whether a flag is set by non-standard means such as environment
- // variables is avaliable.
- //
- // See https://github.com/urfave/cli/issues/294 for additional discussion
- flags := c.Command.Flags
- if c.Command.Name == "" { // cannot == Command{} since it contains slice types
- if c.App != nil {
- flags = c.App.Flags
- }
- }
- for _, f := range flags {
- eachName(f.GetName(), func(name string) {
- if isSet, ok := c.setFlags[name]; isSet || !ok {
- return
- }
-
- val := reflect.ValueOf(f)
- if val.Kind() == reflect.Ptr {
- val = val.Elem()
- }
-
- envVarValue := val.FieldByName("EnvVar")
- if !envVarValue.IsValid() {
- return
- }
-
- eachName(envVarValue.String(), func(envVar string) {
- envVar = strings.TrimSpace(envVar)
- if _, ok := syscall.Getenv(envVar); ok {
- c.setFlags[name] = true
- return
- }
- })
- })
- }
- }
-
- return c.setFlags[name]
-}
-
-// GlobalIsSet determines if the global flag was actually set
-func (c *Context) GlobalIsSet(name string) bool {
- ctx := c
- if ctx.parentContext != nil {
- ctx = ctx.parentContext
- }
-
- for ; ctx != nil; ctx = ctx.parentContext {
- if ctx.IsSet(name) {
- return true
- }
- }
- return false
-}
-
-// FlagNames returns a slice of flag names used in this context.
-func (c *Context) FlagNames() (names []string) {
- for _, flag := range c.Command.Flags {
- name := strings.Split(flag.GetName(), ",")[0]
- if name == "help" {
- continue
- }
- names = append(names, name)
- }
- return
-}
-
-// GlobalFlagNames returns a slice of global flag names used by the app.
-func (c *Context) GlobalFlagNames() (names []string) {
- for _, flag := range c.App.Flags {
- name := strings.Split(flag.GetName(), ",")[0]
- if name == "help" || name == "version" {
- continue
- }
- names = append(names, name)
- }
- return
-}
-
-// Parent returns the parent context, if any
-func (c *Context) Parent() *Context {
- return c.parentContext
-}
-
-// value returns the value of the flag coressponding to `name`
-func (c *Context) value(name string) interface{} {
- return c.flagSet.Lookup(name).Value.(flag.Getter).Get()
-}
-
-// Args contains apps console arguments
-type Args []string
-
-// Args returns the command line arguments associated with the context.
-func (c *Context) Args() Args {
- args := Args(c.flagSet.Args())
- return args
-}
-
-// NArg returns the number of the command line arguments.
-func (c *Context) NArg() int {
- return len(c.Args())
-}
-
-// Get returns the nth argument, or else a blank string
-func (a Args) Get(n int) string {
- if len(a) > n {
- return a[n]
- }
- return ""
-}
-
-// First returns the first argument, or else a blank string
-func (a Args) First() string {
- return a.Get(0)
-}
-
-// Tail returns the rest of the arguments (not the first one)
-// or else an empty string slice
-func (a Args) Tail() []string {
- if len(a) >= 2 {
- return []string(a)[1:]
- }
- return []string{}
-}
-
-// Present checks if there are any arguments present
-func (a Args) Present() bool {
- return len(a) != 0
-}
-
-// Swap swaps arguments at the given indexes
-func (a Args) Swap(from, to int) error {
- if from >= len(a) || to >= len(a) {
- return errors.New("index out of range")
- }
- a[from], a[to] = a[to], a[from]
- return nil
-}
-
-func globalContext(ctx *Context) *Context {
- if ctx == nil {
- return nil
- }
-
- for {
- if ctx.parentContext == nil {
- return ctx
- }
- ctx = ctx.parentContext
- }
-}
-
-func lookupGlobalFlagSet(name string, ctx *Context) *flag.FlagSet {
- if ctx.parentContext != nil {
- ctx = ctx.parentContext
- }
- for ; ctx != nil; ctx = ctx.parentContext {
- if f := ctx.flagSet.Lookup(name); f != nil {
- return ctx.flagSet
- }
- }
- return nil
-}
-
-func copyFlag(name string, ff *flag.Flag, set *flag.FlagSet) {
- switch ff.Value.(type) {
- case *StringSlice:
- default:
- set.Set(name, ff.Value.String())
- }
-}
-
-func normalizeFlags(flags []Flag, set *flag.FlagSet) error {
- visited := make(map[string]bool)
- set.Visit(func(f *flag.Flag) {
- visited[f.Name] = true
- })
- for _, f := range flags {
- parts := strings.Split(f.GetName(), ",")
- if len(parts) == 1 {
- continue
- }
- var ff *flag.Flag
- for _, name := range parts {
- name = strings.Trim(name, " ")
- if visited[name] {
- if ff != nil {
- return errors.New("Cannot use two forms of the same flag: " + name + " " + ff.Name)
- }
- ff = set.Lookup(name)
- }
- }
- if ff == nil {
- continue
- }
- for _, name := range parts {
- name = strings.Trim(name, " ")
- if !visited[name] {
- copyFlag(name, ff, set)
- }
- }
- }
- return nil
-}
diff --git a/vendor/github.com/urfave/cli/errors.go b/vendor/github.com/urfave/cli/errors.go
deleted file mode 100644
index 562b2953..00000000
--- a/vendor/github.com/urfave/cli/errors.go
+++ /dev/null
@@ -1,115 +0,0 @@
-package cli
-
-import (
- "fmt"
- "io"
- "os"
- "strings"
-)
-
-// OsExiter is the function used when the app exits. If not set defaults to os.Exit.
-var OsExiter = os.Exit
-
-// ErrWriter is used to write errors to the user. This can be anything
-// implementing the io.Writer interface and defaults to os.Stderr.
-var ErrWriter io.Writer = os.Stderr
-
-// MultiError is an error that wraps multiple errors.
-type MultiError struct {
- Errors []error
-}
-
-// NewMultiError creates a new MultiError. Pass in one or more errors.
-func NewMultiError(err ...error) MultiError {
- return MultiError{Errors: err}
-}
-
-// Error implements the error interface.
-func (m MultiError) Error() string {
- errs := make([]string, len(m.Errors))
- for i, err := range m.Errors {
- errs[i] = err.Error()
- }
-
- return strings.Join(errs, "\n")
-}
-
-type ErrorFormatter interface {
- Format(s fmt.State, verb rune)
-}
-
-// ExitCoder is the interface checked by `App` and `Command` for a custom exit
-// code
-type ExitCoder interface {
- error
- ExitCode() int
-}
-
-// ExitError fulfills both the builtin `error` interface and `ExitCoder`
-type ExitError struct {
- exitCode int
- message interface{}
-}
-
-// NewExitError makes a new *ExitError
-func NewExitError(message interface{}, exitCode int) *ExitError {
- return &ExitError{
- exitCode: exitCode,
- message: message,
- }
-}
-
-// Error returns the string message, fulfilling the interface required by
-// `error`
-func (ee *ExitError) Error() string {
- return fmt.Sprintf("%v", ee.message)
-}
-
-// ExitCode returns the exit code, fulfilling the interface required by
-// `ExitCoder`
-func (ee *ExitError) ExitCode() int {
- return ee.exitCode
-}
-
-// HandleExitCoder checks if the error fulfills the ExitCoder interface, and if
-// so prints the error to stderr (if it is non-empty) and calls OsExiter with the
-// given exit code. If the given error is a MultiError, then this func is
-// called on all members of the Errors slice and calls OsExiter with the last exit code.
-func HandleExitCoder(err error) {
- if err == nil {
- return
- }
-
- if exitErr, ok := err.(ExitCoder); ok {
- if err.Error() != "" {
- if _, ok := exitErr.(ErrorFormatter); ok {
- fmt.Fprintf(ErrWriter, "%+v\n", err)
- } else {
- fmt.Fprintln(ErrWriter, err)
- }
- }
- OsExiter(exitErr.ExitCode())
- return
- }
-
- if multiErr, ok := err.(MultiError); ok {
- code := handleMultiError(multiErr)
- OsExiter(code)
- return
- }
-}
-
-func handleMultiError(multiErr MultiError) int {
- code := 1
- for _, merr := range multiErr.Errors {
- if multiErr2, ok := merr.(MultiError); ok {
- code = handleMultiError(multiErr2)
- } else {
- fmt.Fprintln(ErrWriter, merr)
- if exitErr, ok := merr.(ExitCoder); ok {
- code = exitErr.ExitCode()
- }
- }
- }
- return code
-}
diff --git a/vendor/github.com/urfave/cli/flag-types.json b/vendor/github.com/urfave/cli/flag-types.json
deleted file mode 100644
index 12231078..00000000
--- a/vendor/github.com/urfave/cli/flag-types.json
+++ /dev/null
@@ -1,93 +0,0 @@
-[
- {
- "name": "Bool",
- "type": "bool",
- "value": false,
- "context_default": "false",
- "parser": "strconv.ParseBool(f.Value.String())"
- },
- {
- "name": "BoolT",
- "type": "bool",
- "value": false,
- "doctail": " that is true by default",
- "context_default": "false",
- "parser": "strconv.ParseBool(f.Value.String())"
- },
- {
- "name": "Duration",
- "type": "time.Duration",
- "doctail": " (see https://golang.org/pkg/time/#ParseDuration)",
- "context_default": "0",
- "parser": "time.ParseDuration(f.Value.String())"
- },
- {
- "name": "Float64",
- "type": "float64",
- "context_default": "0",
- "parser": "strconv.ParseFloat(f.Value.String(), 64)"
- },
- {
- "name": "Generic",
- "type": "Generic",
- "dest": false,
- "context_default": "nil",
- "context_type": "interface{}"
- },
- {
- "name": "Int64",
- "type": "int64",
- "context_default": "0",
- "parser": "strconv.ParseInt(f.Value.String(), 0, 64)"
- },
- {
- "name": "Int",
- "type": "int",
- "context_default": "0",
- "parser": "strconv.ParseInt(f.Value.String(), 0, 64)",
- "parser_cast": "int(parsed)"
- },
- {
- "name": "IntSlice",
- "type": "*IntSlice",
- "dest": false,
- "context_default": "nil",
- "context_type": "[]int",
- "parser": "(f.Value.(*IntSlice)).Value(), error(nil)"
- },
- {
- "name": "Int64Slice",
- "type": "*Int64Slice",
- "dest": false,
- "context_default": "nil",
- "context_type": "[]int64",
- "parser": "(f.Value.(*Int64Slice)).Value(), error(nil)"
- },
- {
- "name": "String",
- "type": "string",
- "context_default": "\"\"",
- "parser": "f.Value.String(), error(nil)"
- },
- {
- "name": "StringSlice",
- "type": "*StringSlice",
- "dest": false,
- "context_default": "nil",
- "context_type": "[]string",
- "parser": "(f.Value.(*StringSlice)).Value(), error(nil)"
- },
- {
- "name": "Uint64",
- "type": "uint64",
- "context_default": "0",
- "parser": "strconv.ParseUint(f.Value.String(), 0, 64)"
- },
- {
- "name": "Uint",
- "type": "uint",
- "context_default": "0",
- "parser": "strconv.ParseUint(f.Value.String(), 0, 64)",
- "parser_cast": "uint(parsed)"
- }
-]
diff --git a/vendor/github.com/urfave/cli/flag.go b/vendor/github.com/urfave/cli/flag.go
deleted file mode 100644
index 877ff352..00000000
--- a/vendor/github.com/urfave/cli/flag.go
+++ /dev/null
@@ -1,799 +0,0 @@
-package cli
-
-import (
- "flag"
- "fmt"
- "reflect"
- "runtime"
- "strconv"
- "strings"
- "syscall"
- "time"
-)
-
-const defaultPlaceholder = "value"
-
-// BashCompletionFlag enables bash-completion for all commands and subcommands
-var BashCompletionFlag Flag = BoolFlag{
- Name: "generate-bash-completion",
- Hidden: true,
-}
-
-// VersionFlag prints the version for the application
-var VersionFlag Flag = BoolFlag{
- Name: "version, v",
- Usage: "print the version",
-}
-
-// HelpFlag prints the help for all commands and subcommands
-// Set to the zero value (BoolFlag{}) to disable flag -- keeps subcommand
-// unless HideHelp is set to true)
-var HelpFlag Flag = BoolFlag{
- Name: "help, h",
- Usage: "show help",
-}
-
-// FlagStringer converts a flag definition to a string. This is used by help
-// to display a flag.
-var FlagStringer FlagStringFunc = stringifyFlag
-
-// FlagsByName is a slice of Flag.
-type FlagsByName []Flag
-
-func (f FlagsByName) Len() int {
- return len(f)
-}
-
-func (f FlagsByName) Less(i, j int) bool {
- return f[i].GetName() < f[j].GetName()
-}
-
-func (f FlagsByName) Swap(i, j int) {
- f[i], f[j] = f[j], f[i]
-}
-
-// Flag is a common interface related to parsing flags in cli.
-// For more advanced flag parsing techniques, it is recommended that
-// this interface be implemented.
-type Flag interface {
- fmt.Stringer
- // Apply Flag settings to the given flag set
- Apply(*flag.FlagSet)
- GetName() string
-}
-
-// errorableFlag is an interface that allows us to return errors during apply
-// it allows flags defined in this library to return errors in a fashion backwards compatible
-// TODO remove in v2 and modify the existing Flag interface to return errors
-type errorableFlag interface {
- Flag
-
- ApplyWithError(*flag.FlagSet) error
-}
-
-func flagSet(name string, flags []Flag) (*flag.FlagSet, error) {
- set := flag.NewFlagSet(name, flag.ContinueOnError)
-
- for _, f := range flags {
- //TODO remove in v2 when errorableFlag is removed
- if ef, ok := f.(errorableFlag); ok {
- if err := ef.ApplyWithError(set); err != nil {
- return nil, err
- }
- } else {
- f.Apply(set)
- }
- }
- return set, nil
-}
-
-func eachName(longName string, fn func(string)) {
- parts := strings.Split(longName, ",")
- for _, name := range parts {
- name = strings.Trim(name, " ")
- fn(name)
- }
-}
-
-// Generic is a generic parseable type identified by a specific flag
-type Generic interface {
- Set(value string) error
- String() string
-}
-
-// Apply takes the flagset and calls Set on the generic flag with the value
-// provided by the user for parsing by the flag
-// Ignores parsing errors
-func (f GenericFlag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError takes the flagset and calls Set on the generic flag with the value
-// provided by the user for parsing by the flag
-func (f GenericFlag) ApplyWithError(set *flag.FlagSet) error {
- val := f.Value
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- if err := val.Set(envVal); err != nil {
- return fmt.Errorf("could not parse %s as value for flag %s: %s", envVal, f.Name, err)
- }
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- set.Var(f.Value, name, f.Usage)
- })
-
- return nil
-}
-
-// StringSlice is an opaque type for []string to satisfy flag.Value and flag.Getter
-type StringSlice []string
-
-// Set appends the string value to the list of values
-func (f *StringSlice) Set(value string) error {
- *f = append(*f, value)
- return nil
-}
-
-// String returns a readable representation of this value (for usage defaults)
-func (f *StringSlice) String() string {
- return fmt.Sprintf("%s", *f)
-}
-
-// Value returns the slice of strings set by this flag
-func (f *StringSlice) Value() []string {
- return *f
-}
-
-// Get returns the slice of strings set by this flag
-func (f *StringSlice) Get() interface{} {
- return *f
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f StringSliceFlag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f StringSliceFlag) ApplyWithError(set *flag.FlagSet) error {
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- newVal := &StringSlice{}
- for _, s := range strings.Split(envVal, ",") {
- s = strings.TrimSpace(s)
- if err := newVal.Set(s); err != nil {
- return fmt.Errorf("could not parse %s as string value for flag %s: %s", envVal, f.Name, err)
- }
- }
- f.Value = newVal
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Value == nil {
- f.Value = &StringSlice{}
- }
- set.Var(f.Value, name, f.Usage)
- })
-
- return nil
-}
-
-// IntSlice is an opaque type for []int to satisfy flag.Value and flag.Getter
-type IntSlice []int
-
-// Set parses the value into an integer and appends it to the list of values
-func (f *IntSlice) Set(value string) error {
- tmp, err := strconv.Atoi(value)
- if err != nil {
- return err
- }
- *f = append(*f, tmp)
- return nil
-}
-
-// String returns a readable representation of this value (for usage defaults)
-func (f *IntSlice) String() string {
- return fmt.Sprintf("%#v", *f)
-}
-
-// Value returns the slice of ints set by this flag
-func (f *IntSlice) Value() []int {
- return *f
-}
-
-// Get returns the slice of ints set by this flag
-func (f *IntSlice) Get() interface{} {
- return *f
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f IntSliceFlag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f IntSliceFlag) ApplyWithError(set *flag.FlagSet) error {
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- newVal := &IntSlice{}
- for _, s := range strings.Split(envVal, ",") {
- s = strings.TrimSpace(s)
- if err := newVal.Set(s); err != nil {
- return fmt.Errorf("could not parse %s as int slice value for flag %s: %s", envVal, f.Name, err)
- }
- }
- f.Value = newVal
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Value == nil {
- f.Value = &IntSlice{}
- }
- set.Var(f.Value, name, f.Usage)
- })
-
- return nil
-}
-
-// Int64Slice is an opaque type for []int to satisfy flag.Value and flag.Getter
-type Int64Slice []int64
-
-// Set parses the value into an integer and appends it to the list of values
-func (f *Int64Slice) Set(value string) error {
- tmp, err := strconv.ParseInt(value, 10, 64)
- if err != nil {
- return err
- }
- *f = append(*f, tmp)
- return nil
-}
-
-// String returns a readable representation of this value (for usage defaults)
-func (f *Int64Slice) String() string {
- return fmt.Sprintf("%#v", *f)
-}
-
-// Value returns the slice of ints set by this flag
-func (f *Int64Slice) Value() []int64 {
- return *f
-}
-
-// Get returns the slice of ints set by this flag
-func (f *Int64Slice) Get() interface{} {
- return *f
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f Int64SliceFlag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f Int64SliceFlag) ApplyWithError(set *flag.FlagSet) error {
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- newVal := &Int64Slice{}
- for _, s := range strings.Split(envVal, ",") {
- s = strings.TrimSpace(s)
- if err := newVal.Set(s); err != nil {
- return fmt.Errorf("could not parse %s as int64 slice value for flag %s: %s", envVal, f.Name, err)
- }
- }
- f.Value = newVal
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Value == nil {
- f.Value = &Int64Slice{}
- }
- set.Var(f.Value, name, f.Usage)
- })
- return nil
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f BoolFlag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f BoolFlag) ApplyWithError(set *flag.FlagSet) error {
- val := false
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- if envVal == "" {
- val = false
- break
- }
-
- envValBool, err := strconv.ParseBool(envVal)
- if err != nil {
- return fmt.Errorf("could not parse %s as bool value for flag %s: %s", envVal, f.Name, err)
- }
-
- val = envValBool
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Destination != nil {
- set.BoolVar(f.Destination, name, val, f.Usage)
- return
- }
- set.Bool(name, val, f.Usage)
- })
-
- return nil
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f BoolTFlag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f BoolTFlag) ApplyWithError(set *flag.FlagSet) error {
- val := true
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- if envVal == "" {
- val = false
- break
- }
-
- envValBool, err := strconv.ParseBool(envVal)
- if err != nil {
- return fmt.Errorf("could not parse %s as bool value for flag %s: %s", envVal, f.Name, err)
- }
-
- val = envValBool
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Destination != nil {
- set.BoolVar(f.Destination, name, val, f.Usage)
- return
- }
- set.Bool(name, val, f.Usage)
- })
-
- return nil
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f StringFlag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f StringFlag) ApplyWithError(set *flag.FlagSet) error {
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- f.Value = envVal
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Destination != nil {
- set.StringVar(f.Destination, name, f.Value, f.Usage)
- return
- }
- set.String(name, f.Value, f.Usage)
- })
-
- return nil
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f IntFlag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f IntFlag) ApplyWithError(set *flag.FlagSet) error {
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- envValInt, err := strconv.ParseInt(envVal, 0, 64)
- if err != nil {
- return fmt.Errorf("could not parse %s as int value for flag %s: %s", envVal, f.Name, err)
- }
- f.Value = int(envValInt)
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Destination != nil {
- set.IntVar(f.Destination, name, f.Value, f.Usage)
- return
- }
- set.Int(name, f.Value, f.Usage)
- })
-
- return nil
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f Int64Flag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f Int64Flag) ApplyWithError(set *flag.FlagSet) error {
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- envValInt, err := strconv.ParseInt(envVal, 0, 64)
- if err != nil {
- return fmt.Errorf("could not parse %s as int value for flag %s: %s", envVal, f.Name, err)
- }
-
- f.Value = envValInt
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Destination != nil {
- set.Int64Var(f.Destination, name, f.Value, f.Usage)
- return
- }
- set.Int64(name, f.Value, f.Usage)
- })
-
- return nil
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f UintFlag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f UintFlag) ApplyWithError(set *flag.FlagSet) error {
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- envValInt, err := strconv.ParseUint(envVal, 0, 64)
- if err != nil {
- return fmt.Errorf("could not parse %s as uint value for flag %s: %s", envVal, f.Name, err)
- }
-
- f.Value = uint(envValInt)
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Destination != nil {
- set.UintVar(f.Destination, name, f.Value, f.Usage)
- return
- }
- set.Uint(name, f.Value, f.Usage)
- })
-
- return nil
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f Uint64Flag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f Uint64Flag) ApplyWithError(set *flag.FlagSet) error {
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- envValInt, err := strconv.ParseUint(envVal, 0, 64)
- if err != nil {
- return fmt.Errorf("could not parse %s as uint64 value for flag %s: %s", envVal, f.Name, err)
- }
-
- f.Value = uint64(envValInt)
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Destination != nil {
- set.Uint64Var(f.Destination, name, f.Value, f.Usage)
- return
- }
- set.Uint64(name, f.Value, f.Usage)
- })
-
- return nil
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f DurationFlag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f DurationFlag) ApplyWithError(set *flag.FlagSet) error {
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- envValDuration, err := time.ParseDuration(envVal)
- if err != nil {
- return fmt.Errorf("could not parse %s as duration for flag %s: %s", envVal, f.Name, err)
- }
-
- f.Value = envValDuration
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Destination != nil {
- set.DurationVar(f.Destination, name, f.Value, f.Usage)
- return
- }
- set.Duration(name, f.Value, f.Usage)
- })
-
- return nil
-}
-
-// Apply populates the flag given the flag set and environment
-// Ignores errors
-func (f Float64Flag) Apply(set *flag.FlagSet) {
- f.ApplyWithError(set)
-}
-
-// ApplyWithError populates the flag given the flag set and environment
-func (f Float64Flag) ApplyWithError(set *flag.FlagSet) error {
- if f.EnvVar != "" {
- for _, envVar := range strings.Split(f.EnvVar, ",") {
- envVar = strings.TrimSpace(envVar)
- if envVal, ok := syscall.Getenv(envVar); ok {
- envValFloat, err := strconv.ParseFloat(envVal, 10)
- if err != nil {
- return fmt.Errorf("could not parse %s as float64 value for flag %s: %s", envVal, f.Name, err)
- }
-
- f.Value = float64(envValFloat)
- break
- }
- }
- }
-
- eachName(f.Name, func(name string) {
- if f.Destination != nil {
- set.Float64Var(f.Destination, name, f.Value, f.Usage)
- return
- }
- set.Float64(name, f.Value, f.Usage)
- })
-
- return nil
-}
-
-func visibleFlags(fl []Flag) []Flag {
- visible := []Flag{}
- for _, flag := range fl {
- field := flagValue(flag).FieldByName("Hidden")
- if !field.IsValid() || !field.Bool() {
- visible = append(visible, flag)
- }
- }
- return visible
-}
-
-func prefixFor(name string) (prefix string) {
- if len(name) == 1 {
- prefix = "-"
- } else {
- prefix = "--"
- }
-
- return
-}
-
-// Returns the placeholder, if any, and the unquoted usage string.
-func unquoteUsage(usage string) (string, string) {
- for i := 0; i < len(usage); i++ {
- if usage[i] == '`' {
- for j := i + 1; j < len(usage); j++ {
- if usage[j] == '`' {
- name := usage[i+1 : j]
- usage = usage[:i] + name + usage[j+1:]
- return name, usage
- }
- }
- break
- }
- }
- return "", usage
-}
-
-func prefixedNames(fullName, placeholder string) string {
- var prefixed string
- parts := strings.Split(fullName, ",")
- for i, name := range parts {
- name = strings.Trim(name, " ")
- prefixed += prefixFor(name) + name
- if placeholder != "" {
- prefixed += " " + placeholder
- }
- if i < len(parts)-1 {
- prefixed += ", "
- }
- }
- return prefixed
-}
-
-func withEnvHint(envVar, str string) string {
- envText := ""
- if envVar != "" {
- prefix := "$"
- suffix := ""
- sep := ", $"
- if runtime.GOOS == "windows" {
- prefix = "%"
- suffix = "%"
- sep = "%, %"
- }
- envText = fmt.Sprintf(" [%s%s%s]", prefix, strings.Join(strings.Split(envVar, ","), sep), suffix)
- }
- return str + envText
-}
-
-func flagValue(f Flag) reflect.Value {
- fv := reflect.ValueOf(f)
- for fv.Kind() == reflect.Ptr {
- fv = reflect.Indirect(fv)
- }
- return fv
-}
-
-func stringifyFlag(f Flag) string {
- fv := flagValue(f)
-
- switch f.(type) {
- case IntSliceFlag:
- return withEnvHint(fv.FieldByName("EnvVar").String(),
- stringifyIntSliceFlag(f.(IntSliceFlag)))
- case Int64SliceFlag:
- return withEnvHint(fv.FieldByName("EnvVar").String(),
- stringifyInt64SliceFlag(f.(Int64SliceFlag)))
- case StringSliceFlag:
- return withEnvHint(fv.FieldByName("EnvVar").String(),
- stringifyStringSliceFlag(f.(StringSliceFlag)))
- }
-
- placeholder, usage := unquoteUsage(fv.FieldByName("Usage").String())
-
- needsPlaceholder := false
- defaultValueString := ""
-
- if val := fv.FieldByName("Value"); val.IsValid() {
- needsPlaceholder = true
- defaultValueString = fmt.Sprintf(" (default: %v)", val.Interface())
-
- if val.Kind() == reflect.String && val.String() != "" {
- defaultValueString = fmt.Sprintf(" (default: %q)", val.String())
- }
- }
-
- if defaultValueString == " (default: )" {
- defaultValueString = ""
- }
-
- if needsPlaceholder && placeholder == "" {
- placeholder = defaultPlaceholder
- }
-
- usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultValueString))
-
- return withEnvHint(fv.FieldByName("EnvVar").String(),
- fmt.Sprintf("%s\t%s", prefixedNames(fv.FieldByName("Name").String(), placeholder), usageWithDefault))
-}
-
-func stringifyIntSliceFlag(f IntSliceFlag) string {
- defaultVals := []string{}
- if f.Value != nil && len(f.Value.Value()) > 0 {
- for _, i := range f.Value.Value() {
- defaultVals = append(defaultVals, fmt.Sprintf("%d", i))
- }
- }
-
- return stringifySliceFlag(f.Usage, f.Name, defaultVals)
-}
-
-func stringifyInt64SliceFlag(f Int64SliceFlag) string {
- defaultVals := []string{}
- if f.Value != nil && len(f.Value.Value()) > 0 {
- for _, i := range f.Value.Value() {
- defaultVals = append(defaultVals, fmt.Sprintf("%d", i))
- }
- }
-
- return stringifySliceFlag(f.Usage, f.Name, defaultVals)
-}
-
-func stringifyStringSliceFlag(f StringSliceFlag) string {
- defaultVals := []string{}
- if f.Value != nil && len(f.Value.Value()) > 0 {
- for _, s := range f.Value.Value() {
- if len(s) > 0 {
- defaultVals = append(defaultVals, fmt.Sprintf("%q", s))
- }
- }
- }
-
- return stringifySliceFlag(f.Usage, f.Name, defaultVals)
-}
-
-func stringifySliceFlag(usage, name string, defaultVals []string) string {
- placeholder, usage := unquoteUsage(usage)
- if placeholder == "" {
- placeholder = defaultPlaceholder
- }
-
- defaultVal := ""
- if len(defaultVals) > 0 {
- defaultVal = fmt.Sprintf(" (default: %s)", strings.Join(defaultVals, ", "))
- }
-
- usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultVal))
- return fmt.Sprintf("%s\t%s", prefixedNames(name, placeholder), usageWithDefault)
-}
diff --git a/vendor/github.com/urfave/cli/flag_generated.go b/vendor/github.com/urfave/cli/flag_generated.go
deleted file mode 100644
index 491b6195..00000000
--- a/vendor/github.com/urfave/cli/flag_generated.go
+++ /dev/null
@@ -1,627 +0,0 @@
-package cli
-
-import (
- "flag"
- "strconv"
- "time"
-)
-
-// WARNING: This file is generated!
-
-// BoolFlag is a flag with type bool
-type BoolFlag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Destination *bool
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f BoolFlag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f BoolFlag) GetName() string {
- return f.Name
-}
-
-// Bool looks up the value of a local BoolFlag, returns
-// false if not found
-func (c *Context) Bool(name string) bool {
- return lookupBool(name, c.flagSet)
-}
-
-// GlobalBool looks up the value of a global BoolFlag, returns
-// false if not found
-func (c *Context) GlobalBool(name string) bool {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupBool(name, fs)
- }
- return false
-}
-
-func lookupBool(name string, set *flag.FlagSet) bool {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := strconv.ParseBool(f.Value.String())
- if err != nil {
- return false
- }
- return parsed
- }
- return false
-}
-
-// BoolTFlag is a flag with type bool that is true by default
-type BoolTFlag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Destination *bool
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f BoolTFlag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f BoolTFlag) GetName() string {
- return f.Name
-}
-
-// BoolT looks up the value of a local BoolTFlag, returns
-// false if not found
-func (c *Context) BoolT(name string) bool {
- return lookupBoolT(name, c.flagSet)
-}
-
-// GlobalBoolT looks up the value of a global BoolTFlag, returns
-// false if not found
-func (c *Context) GlobalBoolT(name string) bool {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupBoolT(name, fs)
- }
- return false
-}
-
-func lookupBoolT(name string, set *flag.FlagSet) bool {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := strconv.ParseBool(f.Value.String())
- if err != nil {
- return false
- }
- return parsed
- }
- return false
-}
-
-// DurationFlag is a flag with type time.Duration (see https://golang.org/pkg/time/#ParseDuration)
-type DurationFlag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value time.Duration
- Destination *time.Duration
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f DurationFlag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f DurationFlag) GetName() string {
- return f.Name
-}
-
-// Duration looks up the value of a local DurationFlag, returns
-// 0 if not found
-func (c *Context) Duration(name string) time.Duration {
- return lookupDuration(name, c.flagSet)
-}
-
-// GlobalDuration looks up the value of a global DurationFlag, returns
-// 0 if not found
-func (c *Context) GlobalDuration(name string) time.Duration {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupDuration(name, fs)
- }
- return 0
-}
-
-func lookupDuration(name string, set *flag.FlagSet) time.Duration {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := time.ParseDuration(f.Value.String())
- if err != nil {
- return 0
- }
- return parsed
- }
- return 0
-}
-
-// Float64Flag is a flag with type float64
-type Float64Flag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value float64
- Destination *float64
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f Float64Flag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f Float64Flag) GetName() string {
- return f.Name
-}
-
-// Float64 looks up the value of a local Float64Flag, returns
-// 0 if not found
-func (c *Context) Float64(name string) float64 {
- return lookupFloat64(name, c.flagSet)
-}
-
-// GlobalFloat64 looks up the value of a global Float64Flag, returns
-// 0 if not found
-func (c *Context) GlobalFloat64(name string) float64 {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupFloat64(name, fs)
- }
- return 0
-}
-
-func lookupFloat64(name string, set *flag.FlagSet) float64 {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := strconv.ParseFloat(f.Value.String(), 64)
- if err != nil {
- return 0
- }
- return parsed
- }
- return 0
-}
-
-// GenericFlag is a flag with type Generic
-type GenericFlag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value Generic
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f GenericFlag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f GenericFlag) GetName() string {
- return f.Name
-}
-
-// Generic looks up the value of a local GenericFlag, returns
-// nil if not found
-func (c *Context) Generic(name string) interface{} {
- return lookupGeneric(name, c.flagSet)
-}
-
-// GlobalGeneric looks up the value of a global GenericFlag, returns
-// nil if not found
-func (c *Context) GlobalGeneric(name string) interface{} {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupGeneric(name, fs)
- }
- return nil
-}
-
-func lookupGeneric(name string, set *flag.FlagSet) interface{} {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := f.Value, error(nil)
- if err != nil {
- return nil
- }
- return parsed
- }
- return nil
-}
-
-// Int64Flag is a flag with type int64
-type Int64Flag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value int64
- Destination *int64
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f Int64Flag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f Int64Flag) GetName() string {
- return f.Name
-}
-
-// Int64 looks up the value of a local Int64Flag, returns
-// 0 if not found
-func (c *Context) Int64(name string) int64 {
- return lookupInt64(name, c.flagSet)
-}
-
-// GlobalInt64 looks up the value of a global Int64Flag, returns
-// 0 if not found
-func (c *Context) GlobalInt64(name string) int64 {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupInt64(name, fs)
- }
- return 0
-}
-
-func lookupInt64(name string, set *flag.FlagSet) int64 {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := strconv.ParseInt(f.Value.String(), 0, 64)
- if err != nil {
- return 0
- }
- return parsed
- }
- return 0
-}
-
-// IntFlag is a flag with type int
-type IntFlag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value int
- Destination *int
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f IntFlag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f IntFlag) GetName() string {
- return f.Name
-}
-
-// Int looks up the value of a local IntFlag, returns
-// 0 if not found
-func (c *Context) Int(name string) int {
- return lookupInt(name, c.flagSet)
-}
-
-// GlobalInt looks up the value of a global IntFlag, returns
-// 0 if not found
-func (c *Context) GlobalInt(name string) int {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupInt(name, fs)
- }
- return 0
-}
-
-func lookupInt(name string, set *flag.FlagSet) int {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := strconv.ParseInt(f.Value.String(), 0, 64)
- if err != nil {
- return 0
- }
- return int(parsed)
- }
- return 0
-}
-
-// IntSliceFlag is a flag with type *IntSlice
-type IntSliceFlag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value *IntSlice
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f IntSliceFlag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f IntSliceFlag) GetName() string {
- return f.Name
-}
-
-// IntSlice looks up the value of a local IntSliceFlag, returns
-// nil if not found
-func (c *Context) IntSlice(name string) []int {
- return lookupIntSlice(name, c.flagSet)
-}
-
-// GlobalIntSlice looks up the value of a global IntSliceFlag, returns
-// nil if not found
-func (c *Context) GlobalIntSlice(name string) []int {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupIntSlice(name, fs)
- }
- return nil
-}
-
-func lookupIntSlice(name string, set *flag.FlagSet) []int {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := (f.Value.(*IntSlice)).Value(), error(nil)
- if err != nil {
- return nil
- }
- return parsed
- }
- return nil
-}
-
-// Int64SliceFlag is a flag with type *Int64Slice
-type Int64SliceFlag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value *Int64Slice
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f Int64SliceFlag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f Int64SliceFlag) GetName() string {
- return f.Name
-}
-
-// Int64Slice looks up the value of a local Int64SliceFlag, returns
-// nil if not found
-func (c *Context) Int64Slice(name string) []int64 {
- return lookupInt64Slice(name, c.flagSet)
-}
-
-// GlobalInt64Slice looks up the value of a global Int64SliceFlag, returns
-// nil if not found
-func (c *Context) GlobalInt64Slice(name string) []int64 {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupInt64Slice(name, fs)
- }
- return nil
-}
-
-func lookupInt64Slice(name string, set *flag.FlagSet) []int64 {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := (f.Value.(*Int64Slice)).Value(), error(nil)
- if err != nil {
- return nil
- }
- return parsed
- }
- return nil
-}
-
-// StringFlag is a flag with type string
-type StringFlag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value string
- Destination *string
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f StringFlag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f StringFlag) GetName() string {
- return f.Name
-}
-
-// String looks up the value of a local StringFlag, returns
-// "" if not found
-func (c *Context) String(name string) string {
- return lookupString(name, c.flagSet)
-}
-
-// GlobalString looks up the value of a global StringFlag, returns
-// "" if not found
-func (c *Context) GlobalString(name string) string {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupString(name, fs)
- }
- return ""
-}
-
-func lookupString(name string, set *flag.FlagSet) string {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := f.Value.String(), error(nil)
- if err != nil {
- return ""
- }
- return parsed
- }
- return ""
-}
-
-// StringSliceFlag is a flag with type *StringSlice
-type StringSliceFlag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value *StringSlice
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f StringSliceFlag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f StringSliceFlag) GetName() string {
- return f.Name
-}
-
-// StringSlice looks up the value of a local StringSliceFlag, returns
-// nil if not found
-func (c *Context) StringSlice(name string) []string {
- return lookupStringSlice(name, c.flagSet)
-}
-
-// GlobalStringSlice looks up the value of a global StringSliceFlag, returns
-// nil if not found
-func (c *Context) GlobalStringSlice(name string) []string {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupStringSlice(name, fs)
- }
- return nil
-}
-
-func lookupStringSlice(name string, set *flag.FlagSet) []string {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := (f.Value.(*StringSlice)).Value(), error(nil)
- if err != nil {
- return nil
- }
- return parsed
- }
- return nil
-}
-
-// Uint64Flag is a flag with type uint64
-type Uint64Flag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value uint64
- Destination *uint64
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f Uint64Flag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f Uint64Flag) GetName() string {
- return f.Name
-}
-
-// Uint64 looks up the value of a local Uint64Flag, returns
-// 0 if not found
-func (c *Context) Uint64(name string) uint64 {
- return lookupUint64(name, c.flagSet)
-}
-
-// GlobalUint64 looks up the value of a global Uint64Flag, returns
-// 0 if not found
-func (c *Context) GlobalUint64(name string) uint64 {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupUint64(name, fs)
- }
- return 0
-}
-
-func lookupUint64(name string, set *flag.FlagSet) uint64 {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := strconv.ParseUint(f.Value.String(), 0, 64)
- if err != nil {
- return 0
- }
- return parsed
- }
- return 0
-}
-
-// UintFlag is a flag with type uint
-type UintFlag struct {
- Name string
- Usage string
- EnvVar string
- Hidden bool
- Value uint
- Destination *uint
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f UintFlag) String() string {
- return FlagStringer(f)
-}
-
-// GetName returns the name of the flag
-func (f UintFlag) GetName() string {
- return f.Name
-}
-
-// Uint looks up the value of a local UintFlag, returns
-// 0 if not found
-func (c *Context) Uint(name string) uint {
- return lookupUint(name, c.flagSet)
-}
-
-// GlobalUint looks up the value of a global UintFlag, returns
-// 0 if not found
-func (c *Context) GlobalUint(name string) uint {
- if fs := lookupGlobalFlagSet(name, c); fs != nil {
- return lookupUint(name, fs)
- }
- return 0
-}
-
-func lookupUint(name string, set *flag.FlagSet) uint {
- f := set.Lookup(name)
- if f != nil {
- parsed, err := strconv.ParseUint(f.Value.String(), 0, 64)
- if err != nil {
- return 0
- }
- return uint(parsed)
- }
- return 0
-}
diff --git a/vendor/github.com/urfave/cli/funcs.go b/vendor/github.com/urfave/cli/funcs.go
deleted file mode 100644
index cba5e6cb..00000000
--- a/vendor/github.com/urfave/cli/funcs.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package cli
-
-// BashCompleteFunc is an action to execute when the bash-completion flag is set
-type BashCompleteFunc func(*Context)
-
-// BeforeFunc is an action to execute before any subcommands are run, but after
-// the context is ready if a non-nil error is returned, no subcommands are run
-type BeforeFunc func(*Context) error
-
-// AfterFunc is an action to execute after any subcommands are run, but after the
-// subcommand has finished it is run even if Action() panics
-type AfterFunc func(*Context) error
-
-// ActionFunc is the action to execute when no subcommands are specified
-type ActionFunc func(*Context) error
-
-// CommandNotFoundFunc is executed if the proper command cannot be found
-type CommandNotFoundFunc func(*Context, string)
-
-// OnUsageErrorFunc is executed if an usage error occurs. This is useful for displaying
-// customized usage error messages. This function is able to replace the
-// original error messages. If this function is not set, the "Incorrect usage"
-// is displayed and the execution is interrupted.
-type OnUsageErrorFunc func(context *Context, err error, isSubcommand bool) error
-
-// FlagStringFunc is used by the help generation to display a flag, which is
-// expected to be a single line.
-type FlagStringFunc func(Flag) string
diff --git a/vendor/github.com/urfave/cli/generate-flag-types b/vendor/github.com/urfave/cli/generate-flag-types
deleted file mode 100755
index 7147381c..00000000
--- a/vendor/github.com/urfave/cli/generate-flag-types
+++ /dev/null
@@ -1,255 +0,0 @@
-#!/usr/bin/env python
-"""
-The flag types that ship with the cli library have many things in common, and
-so we can take advantage of the `go generate` command to create much of the
-source code from a list of definitions. These definitions attempt to cover
-the parts that vary between flag types, and should evolve as needed.
-
-An example of the minimum definition needed is:
-
- {
- "name": "SomeType",
- "type": "sometype",
- "context_default": "nil"
- }
-
-In this example, the code generated for the `cli` package will include a type
-named `SomeTypeFlag` that is expected to wrap a value of type `sometype`.
-Fetching values by name via `*cli.Context` will default to a value of `nil`.
-
-A more complete, albeit somewhat redundant, example showing all available
-definition keys is:
-
- {
- "name": "VeryMuchType",
- "type": "*VeryMuchType",
- "value": true,
- "dest": false,
- "doctail": " which really only wraps a []float64, oh well!",
- "context_type": "[]float64",
- "context_default": "nil",
- "parser": "parseVeryMuchType(f.Value.String())",
- "parser_cast": "[]float64(parsed)"
- }
-
-The meaning of each field is as follows:
-
- name (string) - The type "name", which will be suffixed with
- `Flag` when generating the type definition
- for `cli` and the wrapper type for `altsrc`
- type (string) - The type that the generated `Flag` type for `cli`
- is expected to "contain" as its `.Value` member
- value (bool) - Should the generated `cli` type have a `Value`
- member?
- dest (bool) - Should the generated `cli` type support a
- destination pointer?
- doctail (string) - Additional docs for the `cli` flag type comment
- context_type (string) - The literal type used in the `*cli.Context`
- reader func signature
- context_default (string) - The literal value used as the default by the
- `*cli.Context` reader funcs when no value is
- present
- parser (string) - Literal code used to parse the flag `f`,
- expected to have a return signature of
- (value, error)
- parser_cast (string) - Literal code used to cast the `parsed` value
- returned from the `parser` code
-"""
-
-from __future__ import print_function, unicode_literals
-
-import argparse
-import json
-import os
-import subprocess
-import sys
-import tempfile
-import textwrap
-
-
-class _FancyFormatter(argparse.ArgumentDefaultsHelpFormatter,
- argparse.RawDescriptionHelpFormatter):
- pass
-
-
-def main(sysargs=sys.argv[:]):
- parser = argparse.ArgumentParser(
- description='Generate flag type code!',
- formatter_class=_FancyFormatter)
- parser.add_argument(
- 'package',
- type=str, default='cli', choices=_WRITEFUNCS.keys(),
- help='Package for which flag types will be generated'
- )
- parser.add_argument(
- '-i', '--in-json',
- type=argparse.FileType('r'),
- default=sys.stdin,
- help='Input JSON file which defines each type to be generated'
- )
- parser.add_argument(
- '-o', '--out-go',
- type=argparse.FileType('w'),
- default=sys.stdout,
- help='Output file/stream to which generated source will be written'
- )
- parser.epilog = __doc__
-
- args = parser.parse_args(sysargs[1:])
- _generate_flag_types(_WRITEFUNCS[args.package], args.out_go, args.in_json)
- return 0
-
-
-def _generate_flag_types(writefunc, output_go, input_json):
- types = json.load(input_json)
-
- tmp = tempfile.NamedTemporaryFile(suffix='.go', delete=False)
- writefunc(tmp, types)
- tmp.close()
-
- new_content = subprocess.check_output(
- ['goimports', tmp.name]
- ).decode('utf-8')
-
- print(new_content, file=output_go, end='')
- output_go.flush()
- os.remove(tmp.name)
-
-
-def _set_typedef_defaults(typedef):
- typedef.setdefault('doctail', '')
- typedef.setdefault('context_type', typedef['type'])
- typedef.setdefault('dest', True)
- typedef.setdefault('value', True)
- typedef.setdefault('parser', 'f.Value, error(nil)')
- typedef.setdefault('parser_cast', 'parsed')
-
-
-def _write_cli_flag_types(outfile, types):
- _fwrite(outfile, """\
- package cli
-
- // WARNING: This file is generated!
-
- """)
-
- for typedef in types:
- _set_typedef_defaults(typedef)
-
- _fwrite(outfile, """\
- // {name}Flag is a flag with type {type}{doctail}
- type {name}Flag struct {{
- Name string
- Usage string
- EnvVar string
- Hidden bool
- """.format(**typedef))
-
- if typedef['value']:
- _fwrite(outfile, """\
- Value {type}
- """.format(**typedef))
-
- if typedef['dest']:
- _fwrite(outfile, """\
- Destination *{type}
- """.format(**typedef))
-
- _fwrite(outfile, "\n}\n\n")
-
- _fwrite(outfile, """\
- // String returns a readable representation of this value
- // (for usage defaults)
- func (f {name}Flag) String() string {{
- return FlagStringer(f)
- }}
-
- // GetName returns the name of the flag
- func (f {name}Flag) GetName() string {{
- return f.Name
- }}
-
- // {name} looks up the value of a local {name}Flag, returns
- // {context_default} if not found
- func (c *Context) {name}(name string) {context_type} {{
- return lookup{name}(name, c.flagSet)
- }}
-
- // Global{name} looks up the value of a global {name}Flag, returns
- // {context_default} if not found
- func (c *Context) Global{name}(name string) {context_type} {{
- if fs := lookupGlobalFlagSet(name, c); fs != nil {{
- return lookup{name}(name, fs)
- }}
- return {context_default}
- }}
-
- func lookup{name}(name string, set *flag.FlagSet) {context_type} {{
- f := set.Lookup(name)
- if f != nil {{
- parsed, err := {parser}
- if err != nil {{
- return {context_default}
- }}
- return {parser_cast}
- }}
- return {context_default}
- }}
- """.format(**typedef))
-
-
-def _write_altsrc_flag_types(outfile, types):
- _fwrite(outfile, """\
- package altsrc
-
- import (
- "gopkg.in/urfave/cli.v1"
- )
-
- // WARNING: This file is generated!
-
- """)
-
- for typedef in types:
- _set_typedef_defaults(typedef)
-
- _fwrite(outfile, """\
- // {name}Flag is the flag type that wraps cli.{name}Flag to allow
- // for other values to be specified
- type {name}Flag struct {{
- cli.{name}Flag
- set *flag.FlagSet
- }}
-
- // New{name}Flag creates a new {name}Flag
- func New{name}Flag(fl cli.{name}Flag) *{name}Flag {{
- return &{name}Flag{{{name}Flag: fl, set: nil}}
- }}
-
- // Apply saves the flagSet for later usage calls, then calls the
- // wrapped {name}Flag.Apply
- func (f *{name}Flag) Apply(set *flag.FlagSet) {{
- f.set = set
- f.{name}Flag.Apply(set)
- }}
-
- // ApplyWithError saves the flagSet for later usage calls, then calls the
- // wrapped {name}Flag.ApplyWithError
- func (f *{name}Flag) ApplyWithError(set *flag.FlagSet) error {{
- f.set = set
- return f.{name}Flag.ApplyWithError(set)
- }}
- """.format(**typedef))
-
-
-def _fwrite(outfile, text):
- print(textwrap.dedent(text), end='', file=outfile)
-
-
-_WRITEFUNCS = {
- 'cli': _write_cli_flag_types,
- 'altsrc': _write_altsrc_flag_types
-}
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/vendor/github.com/urfave/cli/help.go b/vendor/github.com/urfave/cli/help.go
deleted file mode 100644
index 57ec98d5..00000000
--- a/vendor/github.com/urfave/cli/help.go
+++ /dev/null
@@ -1,338 +0,0 @@
-package cli
-
-import (
- "fmt"
- "io"
- "os"
- "strings"
- "text/tabwriter"
- "text/template"
-)
-
-// AppHelpTemplate is the text template for the Default help topic.
-// cli.go uses text/template to render templates. You can
-// render custom help text by setting this variable.
-var AppHelpTemplate = `NAME:
- {{.Name}}{{if .Usage}} - {{.Usage}}{{end}}
-
-USAGE:
- {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
-
-VERSION:
- {{.Version}}{{end}}{{end}}{{if .Description}}
-
-DESCRIPTION:
- {{.Description}}{{end}}{{if len .Authors}}
-
-AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
- {{range $index, $author := .Authors}}{{if $index}}
- {{end}}{{$author}}{{end}}{{end}}{{if .VisibleCommands}}
-
-COMMANDS:{{range .VisibleCategories}}{{if .Name}}
- {{.Name}}:{{end}}{{range .VisibleCommands}}
- {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
-
-GLOBAL OPTIONS:
- {{range $index, $option := .VisibleFlags}}{{if $index}}
- {{end}}{{$option}}{{end}}{{end}}{{if .Copyright}}
-
-COPYRIGHT:
- {{.Copyright}}{{end}}
-`
-
-// CommandHelpTemplate is the text template for the command help topic.
-// cli.go uses text/template to render templates. You can
-// render custom help text by setting this variable.
-var CommandHelpTemplate = `NAME:
- {{.HelpName}} - {{.Usage}}
-
-USAGE:
- {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Category}}
-
-CATEGORY:
- {{.Category}}{{end}}{{if .Description}}
-
-DESCRIPTION:
- {{.Description}}{{end}}{{if .VisibleFlags}}
-
-OPTIONS:
- {{range .VisibleFlags}}{{.}}
- {{end}}{{end}}
-`
-
-// SubcommandHelpTemplate is the text template for the subcommand help topic.
-// cli.go uses text/template to render templates. You can
-// render custom help text by setting this variable.
-var SubcommandHelpTemplate = `NAME:
- {{.HelpName}} - {{if .Description}}{{.Description}}{{else}}{{.Usage}}{{end}}
-
-USAGE:
- {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}
-
-COMMANDS:{{range .VisibleCategories}}{{if .Name}}
- {{.Name}}:{{end}}{{range .VisibleCommands}}
- {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}
-{{end}}{{if .VisibleFlags}}
-OPTIONS:
- {{range .VisibleFlags}}{{.}}
- {{end}}{{end}}
-`
-
-var helpCommand = Command{
- Name: "help",
- Aliases: []string{"h"},
- Usage: "Shows a list of commands or help for one command",
- ArgsUsage: "[command]",
- Action: func(c *Context) error {
- args := c.Args()
- if args.Present() {
- return ShowCommandHelp(c, args.First())
- }
-
- ShowAppHelp(c)
- return nil
- },
-}
-
-var helpSubcommand = Command{
- Name: "help",
- Aliases: []string{"h"},
- Usage: "Shows a list of commands or help for one command",
- ArgsUsage: "[command]",
- Action: func(c *Context) error {
- args := c.Args()
- if args.Present() {
- return ShowCommandHelp(c, args.First())
- }
-
- return ShowSubcommandHelp(c)
- },
-}
-
-// Prints help for the App or Command
-type helpPrinter func(w io.Writer, templ string, data interface{})
-
-// Prints help for the App or Command with custom template function.
-type helpPrinterCustom func(w io.Writer, templ string, data interface{}, customFunc map[string]interface{})
-
-// HelpPrinter is a function that writes the help output. If not set a default
-// is used. The function signature is:
-// func(w io.Writer, templ string, data interface{})
-var HelpPrinter helpPrinter = printHelp
-
-// HelpPrinterCustom is same as HelpPrinter but
-// takes a custom function for template function map.
-var HelpPrinterCustom helpPrinterCustom = printHelpCustom
-
-// VersionPrinter prints the version for the App
-var VersionPrinter = printVersion
-
-// ShowAppHelpAndExit - Prints the list of subcommands for the app and exits with exit code.
-func ShowAppHelpAndExit(c *Context, exitCode int) {
- ShowAppHelp(c)
- os.Exit(exitCode)
-}
-
-// ShowAppHelp is an action that displays the help.
-func ShowAppHelp(c *Context) (err error) {
- if c.App.CustomAppHelpTemplate == "" {
- HelpPrinter(c.App.Writer, AppHelpTemplate, c.App)
- return
- }
- customAppData := func() map[string]interface{} {
- if c.App.ExtraInfo == nil {
- return nil
- }
- return map[string]interface{}{
- "ExtraInfo": c.App.ExtraInfo,
- }
- }
- HelpPrinterCustom(c.App.Writer, c.App.CustomAppHelpTemplate, c.App, customAppData())
- return nil
-}
-
-// DefaultAppComplete prints the list of subcommands as the default app completion method
-func DefaultAppComplete(c *Context) {
- for _, command := range c.App.Commands {
- if command.Hidden {
- continue
- }
- for _, name := range command.Names() {
- fmt.Fprintln(c.App.Writer, name)
- }
- }
-}
-
-// ShowCommandHelpAndExit - exits with code after showing help
-func ShowCommandHelpAndExit(c *Context, command string, code int) {
- ShowCommandHelp(c, command)
- os.Exit(code)
-}
-
-// ShowCommandHelp prints help for the given command
-func ShowCommandHelp(ctx *Context, command string) error {
- // show the subcommand help for a command with subcommands
- if command == "" {
- HelpPrinter(ctx.App.Writer, SubcommandHelpTemplate, ctx.App)
- return nil
- }
-
- for _, c := range ctx.App.Commands {
- if c.HasName(command) {
- if c.CustomHelpTemplate != "" {
- HelpPrinterCustom(ctx.App.Writer, c.CustomHelpTemplate, c, nil)
- } else {
- HelpPrinter(ctx.App.Writer, CommandHelpTemplate, c)
- }
- return nil
- }
- }
-
- if ctx.App.CommandNotFound == nil {
- return NewExitError(fmt.Sprintf("No help topic for '%v'", command), 3)
- }
-
- ctx.App.CommandNotFound(ctx, command)
- return nil
-}
-
-// ShowSubcommandHelp prints help for the given subcommand
-func ShowSubcommandHelp(c *Context) error {
- return ShowCommandHelp(c, c.Command.Name)
-}
-
-// ShowVersion prints the version number of the App
-func ShowVersion(c *Context) {
- VersionPrinter(c)
-}
-
-func printVersion(c *Context) {
- fmt.Fprintf(c.App.Writer, "%v version %v\n", c.App.Name, c.App.Version)
-}
-
-// ShowCompletions prints the lists of commands within a given context
-func ShowCompletions(c *Context) {
- a := c.App
- if a != nil && a.BashComplete != nil {
- a.BashComplete(c)
- }
-}
-
-// ShowCommandCompletions prints the custom completions for a given command
-func ShowCommandCompletions(ctx *Context, command string) {
- c := ctx.App.Command(command)
- if c != nil && c.BashComplete != nil {
- c.BashComplete(ctx)
- }
-}
-
-func printHelpCustom(out io.Writer, templ string, data interface{}, customFunc map[string]interface{}) {
- funcMap := template.FuncMap{
- "join": strings.Join,
- }
- if customFunc != nil {
- for key, value := range customFunc {
- funcMap[key] = value
- }
- }
-
- w := tabwriter.NewWriter(out, 1, 8, 2, ' ', 0)
- t := template.Must(template.New("help").Funcs(funcMap).Parse(templ))
- err := t.Execute(w, data)
- if err != nil {
- // If the writer is closed, t.Execute will fail, and there's nothing
- // we can do to recover.
- if os.Getenv("CLI_TEMPLATE_ERROR_DEBUG") != "" {
- fmt.Fprintf(ErrWriter, "CLI TEMPLATE ERROR: %#v\n", err)
- }
- return
- }
- w.Flush()
-}
-
-func printHelp(out io.Writer, templ string, data interface{}) {
- printHelpCustom(out, templ, data, nil)
-}
-
-func checkVersion(c *Context) bool {
- found := false
- if VersionFlag.GetName() != "" {
- eachName(VersionFlag.GetName(), func(name string) {
- if c.GlobalBool(name) || c.Bool(name) {
- found = true
- }
- })
- }
- return found
-}
-
-func checkHelp(c *Context) bool {
- found := false
- if HelpFlag.GetName() != "" {
- eachName(HelpFlag.GetName(), func(name string) {
- if c.GlobalBool(name) || c.Bool(name) {
- found = true
- }
- })
- }
- return found
-}
-
-func checkCommandHelp(c *Context, name string) bool {
- if c.Bool("h") || c.Bool("help") {
- ShowCommandHelp(c, name)
- return true
- }
-
- return false
-}
-
-func checkSubcommandHelp(c *Context) bool {
- if c.Bool("h") || c.Bool("help") {
- ShowSubcommandHelp(c)
- return true
- }
-
- return false
-}
-
-func checkShellCompleteFlag(a *App, arguments []string) (bool, []string) {
- if !a.EnableBashCompletion {
- return false, arguments
- }
-
- pos := len(arguments) - 1
- lastArg := arguments[pos]
-
- if lastArg != "--"+BashCompletionFlag.GetName() {
- return false, arguments
- }
-
- return true, arguments[:pos]
-}
-
-func checkCompletions(c *Context) bool {
- if !c.shellComplete {
- return false
- }
-
- if args := c.Args(); args.Present() {
- name := args.First()
- if cmd := c.App.Command(name); cmd != nil {
- // let the command handle the completion
- return false
- }
- }
-
- ShowCompletions(c)
- return true
-}
-
-func checkCommandCompletions(c *Context, name string) bool {
- if !c.shellComplete {
- return false
- }
-
- ShowCommandCompletions(c, name)
- return true
-}
diff --git a/vendor/github.com/urfave/cli/runtests b/vendor/github.com/urfave/cli/runtests
deleted file mode 100755
index ee22bdee..00000000
--- a/vendor/github.com/urfave/cli/runtests
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/usr/bin/env python
-from __future__ import print_function
-
-import argparse
-import os
-import sys
-import tempfile
-
-from subprocess import check_call, check_output
-
-
-PACKAGE_NAME = os.environ.get(
- 'CLI_PACKAGE_NAME', 'github.com/urfave/cli'
-)
-
-
-def main(sysargs=sys.argv[:]):
- targets = {
- 'vet': _vet,
- 'test': _test,
- 'gfmrun': _gfmrun,
- 'toc': _toc,
- 'gen': _gen,
- }
-
- parser = argparse.ArgumentParser()
- parser.add_argument(
- 'target', nargs='?', choices=tuple(targets.keys()), default='test'
- )
- args = parser.parse_args(sysargs[1:])
-
- targets[args.target]()
- return 0
-
-
-def _test():
- if check_output('go version'.split()).split()[2] < 'go1.2':
- _run('go test -v .')
- return
-
- coverprofiles = []
- for subpackage in ['', 'altsrc']:
- coverprofile = 'cli.coverprofile'
- if subpackage != '':
- coverprofile = '{}.coverprofile'.format(subpackage)
-
- coverprofiles.append(coverprofile)
-
- _run('go test -v'.split() + [
- '-coverprofile={}'.format(coverprofile),
- ('{}/{}'.format(PACKAGE_NAME, subpackage)).rstrip('/')
- ])
-
- combined_name = _combine_coverprofiles(coverprofiles)
- _run('go tool cover -func={}'.format(combined_name))
- os.remove(combined_name)
-
-
-def _gfmrun():
- go_version = check_output('go version'.split()).split()[2]
- if go_version < 'go1.3':
- print('runtests: skip on {}'.format(go_version), file=sys.stderr)
- return
- _run(['gfmrun', '-c', str(_gfmrun_count()), '-s', 'README.md'])
-
-
-def _vet():
- _run('go vet ./...')
-
-
-def _toc():
- _run('node_modules/.bin/markdown-toc -i README.md')
- _run('git diff --exit-code')
-
-
-def _gen():
- go_version = check_output('go version'.split()).split()[2]
- if go_version < 'go1.5':
- print('runtests: skip on {}'.format(go_version), file=sys.stderr)
- return
-
- _run('go generate ./...')
- _run('git diff --exit-code')
-
-
-def _run(command):
- if hasattr(command, 'split'):
- command = command.split()
- print('runtests: {}'.format(' '.join(command)), file=sys.stderr)
- check_call(command)
-
-
-def _gfmrun_count():
- with open('README.md') as infile:
- lines = infile.read().splitlines()
- return len(filter(_is_go_runnable, lines))
-
-
-def _is_go_runnable(line):
- return line.startswith('package main')
-
-
-def _combine_coverprofiles(coverprofiles):
- combined = tempfile.NamedTemporaryFile(
- suffix='.coverprofile', delete=False
- )
- combined.write('mode: set\n')
-
- for coverprofile in coverprofiles:
- with open(coverprofile, 'r') as infile:
- for line in infile.readlines():
- if not line.startswith('mode: '):
- combined.write(line)
-
- combined.flush()
- name = combined.name
- combined.close()
- return name
-
-
-if __name__ == '__main__':
- sys.exit(main())