goimports style fixes.
This commit is contained in:
parent
4551231644
commit
616d4bc57e
9 changed files with 125 additions and 131 deletions
|
@ -3,7 +3,7 @@ package cmd
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/paypal/gorealis/v2"
|
realis "github.com/paypal/gorealis/v2"
|
||||||
"github.com/paypal/gorealis/v2/gen-go/apache/aurora"
|
"github.com/paypal/gorealis/v2/gen-go/apache/aurora"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
|
@ -29,7 +29,6 @@ func init() {
|
||||||
taskStatusCmd.Flags().StringVarP(role, "role", "r", "", "Aurora Role")
|
taskStatusCmd.Flags().StringVarP(role, "role", "r", "", "Aurora Role")
|
||||||
taskStatusCmd.Flags().StringVarP(name, "name", "n", "", "Aurora Name")
|
taskStatusCmd.Flags().StringVarP(name, "name", "n", "", "Aurora Name")
|
||||||
|
|
||||||
|
|
||||||
/* Fetch Leader */
|
/* Fetch Leader */
|
||||||
leaderCmd.Flags().String("zkPath", "/aurora/scheduler", "Zookeeper node path where leader election happens")
|
leaderCmd.Flags().String("zkPath", "/aurora/scheduler", "Zookeeper node path where leader election happens")
|
||||||
|
|
||||||
|
@ -66,7 +65,6 @@ var fetchTaskCmd = &cobra.Command{
|
||||||
Short: "Task information from Aurora",
|
Short: "Task information from Aurora",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var taskConfigCmd = &cobra.Command{
|
var taskConfigCmd = &cobra.Command{
|
||||||
Use: "config",
|
Use: "config",
|
||||||
Short: "Fetch a list of task configurations from Aurora.",
|
Short: "Fetch a list of task configurations from Aurora.",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/paypal/gorealis/v2"
|
realis "github.com/paypal/gorealis/v2"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -49,4 +49,3 @@ func rollbackUpdate(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
fmt.Printf("Rollback update for update ID %v sent successfully\n", updateID)
|
fmt.Printf("Rollback update for update ID %v sent successfully\n", updateID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/spf13/viper"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/paypal/gorealis/v2"
|
"github.com/spf13/viper"
|
||||||
|
|
||||||
|
realis "github.com/paypal/gorealis/v2"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
@ -81,7 +82,6 @@ func setConfig(cmd *cobra.Command, args []string) {
|
||||||
func connect(cmd *cobra.Command, args []string) {
|
func connect(cmd *cobra.Command, args []string) {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
|
||||||
setConfig(cmd, args)
|
setConfig(cmd, args)
|
||||||
|
|
||||||
zkAddrSlice := strings.Split(zkAddr, ",")
|
zkAddrSlice := strings.Split(zkAddr, ",")
|
||||||
|
|
|
@ -2,10 +2,11 @@ package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/pkg/errors"
|
|
||||||
"github.com/spf13/cobra"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/paypal/gorealis/v2/gen-go/apache/aurora"
|
"github.com/paypal/gorealis/v2/gen-go/apache/aurora"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(startCmd)
|
rootCmd.AddCommand(startCmd)
|
||||||
|
|
||||||
|
|
||||||
// Sub-commands
|
// Sub-commands
|
||||||
startCmd.AddCommand(startDrainCmd)
|
startCmd.AddCommand(startDrainCmd)
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ func init() {
|
||||||
|
|
||||||
startCmd.AddCommand(startSLADrainCmd)
|
startCmd.AddCommand(startSLADrainCmd)
|
||||||
|
|
||||||
|
|
||||||
/* SLA Aware commands */
|
/* SLA Aware commands */
|
||||||
startSLADrainCmd.AddCommand(startSLACountDrainCmd)
|
startSLADrainCmd.AddCommand(startSLACountDrainCmd)
|
||||||
|
|
||||||
|
@ -179,7 +178,6 @@ func maintenance(cmd *cobra.Command, args []string) {
|
||||||
monitorInterval,
|
monitorInterval,
|
||||||
monitorTimeout)
|
monitorTimeout)
|
||||||
|
|
||||||
|
|
||||||
maintenanceMonitorPrint(hostResult, []aurora.MaintenanceMode{aurora.MaintenanceMode_SCHEDULED})
|
maintenanceMonitorPrint(hostResult, []aurora.MaintenanceMode{aurora.MaintenanceMode_SCHEDULED})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -20,7 +20,6 @@ func toJSON(v interface{}) string {
|
||||||
return string(output)
|
return string(output)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func getLoggingLevels() string {
|
func getLoggingLevels() string {
|
||||||
|
|
||||||
var buffer bytes.Buffer
|
var buffer bytes.Buffer
|
||||||
|
@ -36,7 +35,6 @@ func getLoggingLevels() string {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func maintenanceMonitorPrint(hostResult map[string]bool, desiredStates []aurora.MaintenanceMode) {
|
func maintenanceMonitorPrint(hostResult map[string]bool, desiredStates []aurora.MaintenanceMode) {
|
||||||
if len(hostResult) > 0 {
|
if len(hostResult) > 0 {
|
||||||
// Create anonymous struct for JSON formatting
|
// Create anonymous struct for JSON formatting
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue