From d30506839afb0ff365cd804d05dce32603a4d5fa Mon Sep 17 00:00:00 2001 From: Ryan McGuire Date: Tue, 26 Nov 2024 12:16:40 -0500 Subject: [PATCH] Start get facet command --- cmd/eia-client/cmd/get/get.go | 13 +++++++++++++ cmd/eia-client/cmd/get/get_facet.go | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 cmd/eia-client/cmd/get/get.go create mode 100644 cmd/eia-client/cmd/get/get_facet.go diff --git a/cmd/eia-client/cmd/get/get.go b/cmd/eia-client/cmd/get/get.go new file mode 100644 index 0000000..941c16e --- /dev/null +++ b/cmd/eia-client/cmd/get/get.go @@ -0,0 +1,13 @@ +package get + +import "github.com/spf13/cobra" + +var GetCmd = &cobra.Command{ + Use: "get", + Aliases: []string{"ls", "l"}, + Short: "Commands for getting metadata", +} + +func init() { + GetCmd.AddCommand(GetFacetsCmd) +} diff --git a/cmd/eia-client/cmd/get/get_facet.go b/cmd/eia-client/cmd/get/get_facet.go new file mode 100644 index 0000000..2915e0e --- /dev/null +++ b/cmd/eia-client/cmd/get/get_facet.go @@ -0,0 +1,18 @@ +package get + +import ( + "github.com/spf13/cobra" + + "gitea.libretechconsulting.com/50W/eia-api-go/cmd/eia-client/internal/util" +) + +var GetFacetsCmd = &cobra.Command{ + Use: "facet route facet", + Args: cobra.ExactArgs(2), + Short: "Describe facet for given API route", + ValidArgsFunction: util.CompleteRouteOrFacet, + Run: RunGetFacetCmd, +} + +func RunGetFacetCmd(cmd *cobra.Command, args []string) { +}