Skip to content

Commit

Permalink
Merge pull request #95 from bschaatsbergen/add-explain-example
Browse files Browse the repository at this point in the history
feat: add explain example
  • Loading branch information
bschaatsbergen authored Mar 16, 2024
2 parents 39881b1 + 8c11061 commit 960d303
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cmd/explain.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,19 @@ import (
"golang.org/x/text/message"
)

const (
explainExample = "# Explain the details of a given IPv4 CIDR range\n" +
"cidr explain 10.1.0.0/16\n" +
"\n" +
"# Explain the details of a given IPv6 CIDR range\n" +
"cidr explain 2001:db8:1234:1a00::/106"
)

var (
explainCmd = &cobra.Command{
Use: "explain",
Short: "Provides information about a CIDR range",
Use: "explain",
Short: "Provides information about a CIDR range",
Example: explainExample,
Run: func(cmd *cobra.Command, args []string) {
if len(args) != 1 {
fmt.Println("error: provide a CIDR range")
Expand Down

0 comments on commit 960d303

Please sign in to comment.