-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* egctl: initialization Signed-off-by: hejianpeng <hejianpeng2@huawei.com> --------- Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
- Loading branch information
Showing
6 changed files
with
387 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright Envoy Gateway Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// The full text of the Apache license is available in the LICENSE file at | ||
// the root of the repo. | ||
|
||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/spf13/cobra" | ||
|
||
"github.com/envoyproxy/gateway/internal/cmd/egctl" | ||
) | ||
|
||
func main() { | ||
if err := rootCommand().Execute(); err != nil { | ||
fmt.Fprintln(os.Stderr, err) | ||
os.Exit(1) | ||
} | ||
} | ||
|
||
func rootCommand() *cobra.Command { | ||
rootCmd := &cobra.Command{ | ||
Use: "egctl", | ||
Long: "A command line utility for operating Envoy Gateway", | ||
SilenceUsage: true, | ||
DisableAutoGenTag: true, | ||
} | ||
|
||
rootCmd.AddCommand(egctl.NewVersionCommand()) | ||
|
||
return rootCmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.