1
0
mirror of https://github.com/inexio/thola.git synced 2026-10-24 03:08:55 +03:00
Files
thola/cmd/read_count_interfaces.go
mikameyer 747239d114 rename core => internal
mikrotik bugfix
2021-06-09 15:08:20 +02:00

24 lines
528 B
Go

package cmd
import (
"github.com/inexio/thola/internal/request"
"github.com/spf13/cobra"
)
func init() {
addDeviceFlags(readCountInterfacesCMD)
readCMD.AddCommand(readCountInterfacesCMD)
}
var readCountInterfacesCMD = &cobra.Command{
Use: "count-interfaces",
Short: "Count interfaces of a device",
Long: "Count the interfaces of a device.",
Run: func(cmd *cobra.Command, args []string) {
request := request.ReadCountInterfacesRequest{
ReadRequest: getReadRequest(args[0]),
}
handleRequest(&request)
},
}