goimports style fixes.

This commit is contained in:
Renan DelValle 2019-03-19 15:28:24 -07:00
parent 4551231644
commit 616d4bc57e
No known key found for this signature in database
GPG key ID: C240AD6D6F443EC9
9 changed files with 125 additions and 131 deletions

View file

@ -3,7 +3,7 @@ package cmd
import (
"fmt"
"github.com/paypal/gorealis/v2"
realis "github.com/paypal/gorealis/v2"
"github.com/paypal/gorealis/v2/gen-go/apache/aurora"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
@ -29,7 +29,6 @@ func init() {
taskStatusCmd.Flags().StringVarP(role, "role", "r", "", "Aurora Role")
taskStatusCmd.Flags().StringVarP(name, "name", "n", "", "Aurora Name")
/* Fetch Leader */
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",
}
var taskConfigCmd = &cobra.Command{
Use: "config",
Short: "Fetch a list of task configurations from Aurora.",

View file

@ -1,7 +1,7 @@
package cmd
import (
"github.com/paypal/gorealis/v2"
realis "github.com/paypal/gorealis/v2"
"github.com/spf13/cobra"
)

View file

@ -49,4 +49,3 @@ func rollbackUpdate(cmd *cobra.Command, args []string) {
fmt.Printf("Rollback update for update ID %v sent successfully\n", updateID)
}

View file

@ -1,11 +1,12 @@
package cmd
import (
"github.com/spf13/viper"
"strings"
"time"
"github.com/paypal/gorealis/v2"
"github.com/spf13/viper"
realis "github.com/paypal/gorealis/v2"
"github.com/spf13/cobra"
"github.com/sirupsen/logrus"
@ -81,7 +82,6 @@ func setConfig(cmd *cobra.Command, args []string) {
func connect(cmd *cobra.Command, args []string) {
var err error
setConfig(cmd, args)
zkAddrSlice := strings.Split(zkAddr, ",")

View file

@ -2,10 +2,11 @@ package cmd
import (
"fmt"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"strconv"
"strings"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
func init() {

View file

@ -1,15 +1,15 @@
package cmd
import (
"time"
"github.com/paypal/gorealis/v2/gen-go/apache/aurora"
"github.com/spf13/cobra"
"time"
)
func init() {
rootCmd.AddCommand(startCmd)
// Sub-commands
startCmd.AddCommand(startDrainCmd)
@ -19,7 +19,6 @@ func init() {
startCmd.AddCommand(startSLADrainCmd)
/* SLA Aware commands */
startSLADrainCmd.AddCommand(startSLACountDrainCmd)
@ -179,7 +178,6 @@ func maintenance(cmd *cobra.Command, args []string) {
monitorInterval,
monitorTimeout)
maintenanceMonitorPrint(hostResult, []aurora.MaintenanceMode{aurora.MaintenanceMode_SCHEDULED})
if err != nil {

View file

@ -20,7 +20,6 @@ func toJSON(v interface{}) string {
return string(output)
}
func getLoggingLevels() string {
var buffer bytes.Buffer
@ -36,7 +35,6 @@ func getLoggingLevels() string {
}
func maintenanceMonitorPrint(hostResult map[string]bool, desiredStates []aurora.MaintenanceMode) {
if len(hostResult) > 0 {
// Create anonymous struct for JSON formatting