Go fmt on the entire project
This commit is contained in:
parent
b636ff490c
commit
2678032c2c
6 changed files with 18 additions and 18 deletions
|
@ -29,7 +29,7 @@ func (tw taskWrapper) ID() string {
|
|||
}
|
||||
|
||||
// Cluster wide capper
|
||||
type ClusterwideCapper struct {}
|
||||
type ClusterwideCapper struct{}
|
||||
|
||||
// Defining constructor for clusterwideCapper. Please don't call this directly and instead use GetClusterwideCapperInstance()
|
||||
func newClusterwideCapper() *ClusterwideCapper {
|
||||
|
|
|
@ -2,8 +2,8 @@ package main
|
|||
|
||||
import (
|
||||
"bitbucket.org/sunybingcloud/electron/def"
|
||||
"bitbucket.org/sunybingcloud/electron/schedulers"
|
||||
"bitbucket.org/sunybingcloud/electron/pcp"
|
||||
"bitbucket.org/sunybingcloud/electron/schedulers"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/golang/protobuf/proto"
|
||||
|
|
|
@ -170,7 +170,7 @@ func (s *BPSWClassMapWatts) ResourceOffers(driver sched.SchedulerDriver, offers
|
|||
// Does the task fit
|
||||
// OR lazy evaluation. If ignore watts is set to true, second statement won't
|
||||
// be evaluated.
|
||||
if (s.ignoreWatts || (offerWatts >= (totalWatts+task.ClassToWatts[nodeClass]))) &&
|
||||
if (s.ignoreWatts || (offerWatts >= (totalWatts + task.ClassToWatts[nodeClass]))) &&
|
||||
(offerCPU >= (totalCPU + task.CPU)) &&
|
||||
(offerRAM >= (totalRAM + task.RAM)) {
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ func (s *ProactiveClusterwideCapRanked) ResourceOffers(driver sched.SchedulerDri
|
|||
}
|
||||
|
||||
// sorting the tasks in ascending order of watts.
|
||||
if (len(s.tasks) > 0) {
|
||||
if len(s.tasks) > 0 {
|
||||
sort.Sort(def.WattsSorter(s.tasks))
|
||||
// calculating the total number of tasks ranked.
|
||||
numberOfRankedTasks := 0
|
||||
|
|
|
@ -7,8 +7,8 @@ One should implement Val() to be able to use this utility.
|
|||
package runAvg
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"container/list"
|
||||
"errors"
|
||||
)
|
||||
|
||||
type Interface interface {
|
||||
|
@ -30,7 +30,7 @@ var racSingleton *runningAverageCalculator
|
|||
// return single instance
|
||||
func getInstance(curSum float64, wSize int) *runningAverageCalculator {
|
||||
if racSingleton == nil {
|
||||
racSingleton = &runningAverageCalculator {
|
||||
racSingleton = &runningAverageCalculator{
|
||||
windowSize: wSize,
|
||||
currentSum: curSum,
|
||||
}
|
||||
|
|
Reference in a new issue