From 359a12b5f891239fef50540a6805e82446ed3509 Mon Sep 17 00:00:00 2001 From: Alexander Wang Date: Wed, 16 Nov 2022 16:48:46 -0800 Subject: [PATCH] 2022-11-16 04:48:46PM --- d2plugin/serve.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d2plugin/serve.go b/d2plugin/serve.go index a51c48614..2db42d215 100644 --- a/d2plugin/serve.go +++ b/d2plugin/serve.go @@ -19,12 +19,12 @@ import ( // Also see execPlugin in exec.go for the d2 binary plugin protocol. func Serve(p Plugin) func(context.Context, *xmain.State) error { return func(ctx context.Context, ms *xmain.State) (err error) { - if len(ms.Opts.Args()) < 1 { + if len(ms.Opts.Flags.Args()) < 1 { return errors.New("expected first argument to plugin binary to be function name") } - reqFunc := ms.Opts.Arg(0) + reqFunc := ms.Opts.Flags.Arg(0) - switch ms.Opts.Arg(0) { + switch ms.Opts.Flags.Arg(0) { case "info": return info(ctx, p, ms) case "layout":