Go FMT run on entire project

This commit is contained in:
Renan DelValle 2016-10-18 17:42:09 -04:00
parent 7c7d80b557
commit 86790133e1
4 changed files with 6 additions and 6 deletions

View file

@ -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)

View file

@ -2,7 +2,7 @@ package pcp
type Victim struct {
Watts float64
Host string
Host string
}
type VictimSorter []Victim

View file

@ -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")

View file

@ -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")