11package main
22
33import (
4- "bytes"
4+ "bytes"
55 "fmt"
6- "os "
7- "io "
8- "runtime"
6+ "io "
7+ "os "
8+ "runtime"
99 "strconv"
1010 "strings"
11- "text/template"
11+ "text/template"
1212
13- "code.cloudfoundry.org/cli/plugin"
14- "code.cloudfoundry.org/cli/cf/i18n"
13+ "code.cloudfoundry.org/cli/cf/i18n"
1514 "code.cloudfoundry.org/cli/cf/terminal"
1615 "code.cloudfoundry.org/cli/cf/trace"
16+ "code.cloudfoundry.org/cli/plugin"
1717
1818 "github.com/cloudfoundry-community/ocf-scheduler-cf-plugin/commands"
1919 "github.com/cloudfoundry-community/ocf-scheduler-cf-plugin/core"
@@ -155,29 +155,29 @@ func (c *OCFScheduler) GetMetadata() plugin.PluginMetadata {
155155
156156func (c * OCFScheduler ) Run (cliConnection plugin.CliConnection , args []string ) {
157157
158- i18n .T = func (translationID string , args ... interface {}) string {
159- var buffer bytes.Buffer
158+ i18n .T = func (translationID string , args ... interface {}) string {
159+ var buffer bytes.Buffer
160160
161- var keys interface {}
161+ var keys interface {}
162162 if len (args ) > 0 {
163163 keys = args [0 ]
164164 }
165165
166166 formattedTemplate := template .Must (template .New ("Display Text" ).Parse (translationID ))
167167 err := formattedTemplate .Execute (& buffer , keys )
168168 if err != nil {
169- return translationID + "\n template processing failed " + err .Error () + "\n "
169+ return translationID + "\n template processing failed " + err .Error () + "\n "
170170 }
171171
172172 return buffer .String ()
173173 }
174174
175- if runtime .GOOS == "windows" {
175+ if runtime .GOOS == "windows" {
176176 terminal .UserAskedForColors = "false"
177177 }
178- terminal .InitColorSupport ()
179- teePrinter = terminal .NewTeePrinter (os .Stdout )
180- // Should we really be using NewPluginUI instead TODO
178+ terminal .InitColorSupport ()
179+ teePrinter = terminal .NewTeePrinter (os .Stdout )
180+ // Should we really be using NewPluginUI instead TODO
181181 ui = terminal .NewUI (os .Stdin , os .Stdout , teePrinter , trace .NewWriterPrinter (io .Discard , false ))
182182
183183 scheduler , err := core .GetScheduler (cliConnection )
@@ -198,7 +198,7 @@ func (c *OCFScheduler) Run(cliConnection plugin.CliConnection, args []string) {
198198 return
199199 }
200200
201- services := & core.Services {CLI : cliConnection , Client : client , UI : ui }
201+ services := & core.Services {CLI : cliConnection , Client : client , UI : ui }
202202
203203 switch args [0 ] {
204204 case "create-job" :
0 commit comments