diff --git a/cmd/goat/blob.go b/cmd/goat/blob.go index dc10cc738..8742d8e19 100644 --- a/cmd/goat/blob.go +++ b/cmd/goat/blob.go @@ -29,8 +29,8 @@ var cmdBlob = &cli.Command{ Usage: "directory to store blobs in", }, &cli.StringFlag{ - Name: "pds-host", - Usage: "URL of the PDS to export blobs from (overrides DID doc)", + Name: "pds-host", + Usage: "URL of the PDS to export blobs from (overrides DID doc)", }, }, Action: runBlobExport, diff --git a/cmd/goat/identity.go b/cmd/goat/identity.go index 49d85ab87..e18803997 100644 --- a/cmd/goat/identity.go +++ b/cmd/goat/identity.go @@ -15,8 +15,13 @@ var cmdResolve = &cli.Command{ Name: "resolve", Usage: "lookup identity metadata", ArgsUsage: ``, - Flags: []cli.Flag{}, - Action: runResolve, + Flags: []cli.Flag{ + &cli.BoolFlag{ + Name: "did", + Usage: "just resolve to DID", + }, + }, + Action: runResolve, } func runResolve(cctx *cli.Context) error { @@ -33,11 +38,20 @@ func runResolve(cctx *cli.Context) error { dir := identity.BaseDirectory{} var doc *identity.DIDDocument + if cctx.Bool("did") { + if atid.IsDID() { + } + } + if atid.IsDID() { did, err := atid.AsDID() if err != nil { return err } + if cctx.Bool("did") { + fmt.Println(did) + return nil + } doc, err = dir.ResolveDID(ctx, did) if err != nil { return err @@ -51,6 +65,10 @@ func runResolve(cctx *cli.Context) error { if err != nil { return err } + if cctx.Bool("did") { + fmt.Println(did) + return nil + } doc, err = dir.ResolveDID(ctx, did) if err != nil { return err