Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move cmd files in dedicated dirs #434

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/inventory-get.go → cmd/inventory/inventory-get.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.

// Package cmd implements the CLI commands
package cmd
// Package inventory implements inventory related CLI commands
package inventory

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions cmd/ipsec-stats.go → cmd/ipsec/ipsec-stats.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.

// Package cmd implements the CLI commands
package cmd
// Package ipsec implements the ipsec related CLI commands
package ipsec

import (
"fmt"
Expand Down
4 changes: 2 additions & 2 deletions cmd/ipsec-test.go → cmd/ipsec/ipsec-test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.

// Package cmd implements the CLI commands
package cmd
// Package ipsec implements the ipsec related CLI commands
package ipsec

import (
"fmt"
Expand Down
4 changes: 2 additions & 2 deletions cmd/evpn-bridge-port.go → cmd/network/evpn-bridge-port.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Copyright (c) 2022-2023 Intel Corporation, or its subsidiaries.
// Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.

// Package cmd implements the CLI commands
package cmd
// Package network implements the network related CLI commands
package network

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Copyright (c) 2022-2023 Intel Corporation, or its subsidiaries.
// Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.

// Package cmd implements the CLI commands
package cmd
// Package network implements the network related CLI commands
package network

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions cmd/evpn-svi.go → cmd/network/evpn-svi.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Copyright (c) 2022-2023 Intel Corporation, or its subsidiaries.
// Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.

// Package cmd implements the CLI commands
package cmd
// Package network implements the network related CLI commands
package network

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions cmd/evpn-test.go → cmd/network/evpn-test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Copyright (c) 2022-2023 Intel Corporation, or its subsidiaries.
// Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.

// Package cmd implements the CLI commands
package cmd
// Package network implements the network related CLI commands
package network

import (
"log"
Expand Down
4 changes: 2 additions & 2 deletions cmd/evpn-vrf.go → cmd/network/evpn-vrf.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Copyright (c) 2022-2023 Intel Corporation, or its subsidiaries.
// Copyright (c) 2022-2023 Dell Inc, or its subsidiaries.

// Package cmd implements the CLI commands
package cmd
// Package network implements the network related CLI commands
package network

import (
"context"
Expand Down
10 changes: 6 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
"log"
"os"

"github.com/opiproject/godpu/cmd"
"github.com/opiproject/godpu/cmd/inventory"
"github.com/opiproject/godpu/cmd/ipsec"
"github.com/opiproject/godpu/cmd/network"
"github.com/opiproject/godpu/cmd/storage"
"github.com/spf13/cobra"
)
Expand Down Expand Up @@ -36,9 +38,9 @@ func newCommand() *cobra.Command {
os.Exit(1)
},
}
c.AddCommand(cmd.NewInventoryCommand())
c.AddCommand(cmd.NewIPSecCommand())
c.AddCommand(inventory.NewInventoryCommand())
c.AddCommand(ipsec.NewIPSecCommand())
c.AddCommand(storage.NewStorageCommand())
c.AddCommand(cmd.NewEvpnCommand())
c.AddCommand(network.NewEvpnCommand())
return c
}
Loading