Skip to content

Commit

Permalink
chore(cli): create 'file' subcommand for ApiOps commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske committed Jul 14, 2023
1 parent a9a77fe commit 351a3e8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
24 changes: 24 additions & 0 deletions cmd/file.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
*/
package cmd

import (
"github.com/spf13/cobra"
)

//
//
// Define the CLI data for the file sub-command
//
//

func newAddFileCmd() *cobra.Command {
addFileCmd := &cobra.Command{
Use: "file [sub-command]...",
Short: "Sub-command to host the decK file manipulation operations",
Long: `Sub-command to host the decK file manipulation operations`,
}

return addFileCmd
}
18 changes: 11 additions & 7 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,17 @@ It can be used to export, import, or sync entities to Kong.`,
rootCmd.AddCommand(newCompletionCmd())
rootCmd.AddCommand(newKonnectCmd())
// commands from go-apiops library:
rootCmd.AddCommand(newAddPluginsCmd())
rootCmd.AddCommand(newAddTagsCmd())
rootCmd.AddCommand(newListTagsCmd())
rootCmd.AddCommand(newRemoveTagsCmd())
rootCmd.AddCommand(newMergeCmd())
rootCmd.AddCommand(newPatchCmd())
rootCmd.AddCommand(newOpenapi2KongCmd())
fileCmd := newAddFileCmd()
{
rootCmd.AddCommand(fileCmd)
fileCmd.AddCommand(newAddPluginsCmd())
fileCmd.AddCommand(newAddTagsCmd())
fileCmd.AddCommand(newListTagsCmd())
fileCmd.AddCommand(newRemoveTagsCmd())
fileCmd.AddCommand(newMergeCmd())
fileCmd.AddCommand(newPatchCmd())
fileCmd.AddCommand(newOpenapi2KongCmd())
}
return rootCmd
}

Expand Down

0 comments on commit 351a3e8

Please sign in to comment.