From 86790133e1d5da88a230970c6870d1dcb9b0e6a6 Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Tue, 18 Oct 2016 17:42:09 -0400 Subject: [PATCH] Go FMT run on entire project --- pcp/loganddynamiccap.go | 2 +- pcp/victim.go | 2 +- rapl/cap.go | 4 ++-- schedulers/firstfitsortedwatts.go | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pcp/loganddynamiccap.go b/pcp/loganddynamiccap.go index 577a395..cc2776f 100644 --- a/pcp/loganddynamiccap.go +++ b/pcp/loganddynamiccap.go @@ -1,6 +1,7 @@ package pcp import ( + "bitbucket.org/bingcloud/electron/rapl" "bufio" "container/ring" "log" @@ -12,7 +13,6 @@ import ( "strings" "syscall" "time" - "bitbucket.org/bingcloud/electron/rapl" ) var RAPLUnits = math.Pow(2, -32) diff --git a/pcp/victim.go b/pcp/victim.go index 47c0ebb..801cc48 100644 --- a/pcp/victim.go +++ b/pcp/victim.go @@ -2,7 +2,7 @@ package pcp type Victim struct { Watts float64 - Host string + Host string } type VictimSorter []Victim diff --git a/rapl/cap.go b/rapl/cap.go index c25eb66..20cd945 100644 --- a/rapl/cap.go +++ b/rapl/cap.go @@ -1,12 +1,12 @@ package rapl import ( - "golang.org/x/crypto/ssh" "github.com/pkg/errors" + "golang.org/x/crypto/ssh" "strconv" ) -func Cap(host, username string, percentage int) (error) { +func Cap(host, username string, percentage int) error { if percentage > 100 || percentage < 0 { return errors.New("Percentage is out of range") diff --git a/schedulers/firstfitsortedwatts.go b/schedulers/firstfitsortedwatts.go index 7214822..faab082 100644 --- a/schedulers/firstfitsortedwatts.go +++ b/schedulers/firstfitsortedwatts.go @@ -8,9 +8,9 @@ import ( "github.com/mesos/mesos-go/mesosutil" sched "github.com/mesos/mesos-go/scheduler" "log" + "sort" "strings" "time" - "sort" ) // Decides if to take an offer or not @@ -177,7 +177,7 @@ func (s *FirstFitSortedWatts) ResourceOffers(driver sched.SchedulerDriver, offer if *task.Instances <= 0 { // All instances of task have been scheduled, remove it - s.tasks= append(s.tasks[:i], s.tasks[i+1:]...) + s.tasks = append(s.tasks[:i], s.tasks[i+1:]...) if len(s.tasks) <= 0 { log.Println("Done scheduling all tasks")