@@ -48,28 +48,28 @@ package eoscli
48
48
// for _, id := range c.Args().Slice() {
49
49
// group, project, _, err := extends.DecodeExtenderId(id)
50
50
// if err != nil {
51
- // fmt.Printf ("%s is not exists\n", id)
51
+ // log.Debugf ("%s is not exists\n", id)
52
52
// continue
53
53
// }
54
54
// versions, err := extends.GetAvailableVersions(group, project)
55
55
// if err != nil {
56
- // fmt.Printf ("%s is not exists\n", id)
56
+ // log.Debugf ("%s is not exists\n", id)
57
57
// continue
58
58
// }
59
- // fmt.Printf ("[%s]\n", id)
59
+ // log.Debugf ("[%s]\n", id)
60
60
// for i, v := range versions {
61
61
// isLatest := ""
62
62
// if v.IsLatest {
63
63
// isLatest = "(latest)"
64
64
// }
65
65
// if i != 0 {
66
- // fmt.Printf ("\t\t")
66
+ // log.Debugf ("\t\t")
67
67
// } else {
68
- // fmt.Printf (" ")
68
+ // log.Debugf (" ")
69
69
// }
70
- // fmt.Printf ("%s:%s %s", id, v.Version, isLatest)
70
+ // log.Debugf ("%s:%s %s", id, v.Version, isLatest)
71
71
// }
72
- // fmt.Println ()
72
+ // log.Debug ()
73
73
// }
74
74
//
75
75
// return nil
@@ -100,9 +100,9 @@ package eoscli
100
100
// }
101
101
// all := register.All()
102
102
//
103
- // fmt.Println ("read:", id)
103
+ // log.Debug ("read:", id)
104
104
// for _, name := range all {
105
- // fmt.Println ("\t", name)
105
+ // log.Debug ("\t", name)
106
106
// }
107
107
// }
108
108
//
@@ -130,7 +130,7 @@ package eoscli
130
130
//
131
131
//func ExtenderInstall(c *cli.Context) error {
132
132
// if c.Args().Len() < 1 {
133
- // fmt.Println ("empty extender id list")
133
+ // log.Debug ("empty extender id list")
134
134
// return nil
135
135
// }
136
136
// pid, err := readPid(env.PidFileDir())
@@ -156,35 +156,35 @@ package eoscli
156
156
// }
157
157
//
158
158
// if len(response.Extends) > 0 {
159
- // fmt.Println ("the extender which are installed are below:")
159
+ // log.Debug ("the extender which are installed are below:")
160
160
// for _, ext := range response.Extends {
161
- // fmt.Printf ("name:%s\nversion:%s\n", extends.FormatProject(ext.Group, ext.Project), ext.Version)
161
+ // log.Debugf ("name:%s\nversion:%s\n", extends.FormatProject(ext.Group, ext.Project), ext.Version)
162
162
// if len(ext.Plugins) < 1 {
163
- // fmt.Printf ("this extender has not plugin\n")
163
+ // log.Debugf ("this extender has not plugin\n")
164
164
// continue
165
165
// }
166
- // fmt.Printf ("the plugins in extender are below:\n")
166
+ // log.Debugf ("the plugins in extender are below:\n")
167
167
// for _, p := range ext.Plugins {
168
- // fmt.Printf ("plugin id:%s\nplugin name:%s\n", p.Id, p.Name)
168
+ // log.Debugf ("plugin id:%s\nplugin name:%s\n", p.Id, p.Name)
169
169
// continue
170
170
// }
171
171
// }
172
172
// }
173
173
//
174
174
// if len(response.FailExtends) > 0 {
175
- // fmt.Println ("the extender which are installed failed are below:")
175
+ // log.Debug ("the extender which are installed failed are below:")
176
176
// for _, ext := range response.FailExtends {
177
- // fmt.Printf ("name: %s, reason: %s\n", extends.FormatProject(ext.Group, ext.Project), ext.Msg)
177
+ // log.Debugf ("name: %s, reason: %s\n", extends.FormatProject(ext.Group, ext.Project), ext.Msg)
178
178
// }
179
179
// }
180
180
//
181
- // fmt.Println ("extender install finish")
181
+ // log.Debug ("extender install finish")
182
182
// return nil
183
183
//}
184
184
//
185
185
//func ExtenderUpgrade(c *cli.Context) error {
186
186
// if c.Args().Len() < 1 {
187
- // fmt.Println ("empty extender id list")
187
+ // log.Debug ("empty extender id list")
188
188
// return nil
189
189
// }
190
190
// pid, err := readPid(env.PidFileDir())
@@ -207,34 +207,34 @@ package eoscli
207
207
// return errors.New(response.Msg)
208
208
// }
209
209
// if len(response.Extends) > 0 {
210
- // fmt.Println ("the extender which are upgraded are below:")
210
+ // log.Debug ("the extender which are upgraded are below:")
211
211
// for _, ext := range response.Extends {
212
- // fmt.Printf ("name:%s\nversion:%s\n", extends.FormatProject(ext.Group, ext.Project), ext.Version)
212
+ // log.Debugf ("name:%s\nversion:%s\n", extends.FormatProject(ext.Group, ext.Project), ext.Version)
213
213
// if len(ext.Plugins) < 1 {
214
- // fmt.Printf ("the extender has not plugin\n")
214
+ // log.Debugf ("the extender has not plugin\n")
215
215
// continue
216
216
// }
217
- // fmt.Printf ("the plugins in extender are below:\n")
217
+ // log.Debugf ("the plugins in extender are below:\n")
218
218
// for _, p := range ext.Plugins {
219
- // fmt.Printf ("id:%s\nname:%s\n", p.Id, p.Name)
219
+ // log.Debugf ("id:%s\nname:%s\n", p.Id, p.Name)
220
220
// continue
221
221
// }
222
222
// }
223
223
// }
224
224
//
225
225
// if len(response.FailExtends) > 0 {
226
- // fmt.Println ("the extender which are upgraded failed are below:")
226
+ // log.Debug ("the extender which are upgraded failed are below:")
227
227
// for _, ext := range response.FailExtends {
228
- // fmt.Printf ("name: %s, reason: %s\n", extends.FormatProject(ext.Group, ext.Project), ext.Msg)
228
+ // log.Debugf ("name: %s, reason: %s\n", extends.FormatProject(ext.Group, ext.Project), ext.Msg)
229
229
// }
230
230
// }
231
- // fmt.Println ("extender uninstall finish")
231
+ // log.Debug ("extender uninstall finish")
232
232
// return nil
233
233
//}
234
234
//
235
235
//func ExtenderUninstall(c *cli.Context) error {
236
236
// if c.Args().Len() < 1 {
237
- // fmt.Println ("empty extender id list")
237
+ // log.Debug ("empty extender id list")
238
238
// return nil
239
239
// }
240
240
// pid, err := readPid(env.PidFileDir())
@@ -257,31 +257,31 @@ package eoscli
257
257
// return errors.New(response.Msg)
258
258
// }
259
259
// if len(response.Extends) < 1 {
260
- // fmt.Printf ("extender:%s need not uninstall\n", strings.Join(c.Args().Slice(), ","))
260
+ // log.Debugf ("extender:%s need not uninstall\n", strings.Join(c.Args().Slice(), ","))
261
261
// return nil
262
262
// }
263
263
// if len(response.Extends) > 0 {
264
- // fmt.Println ("the extender which are uninstall are below:")
264
+ // log.Debug ("the extender which are uninstall are below:")
265
265
// for _, ext := range response.Extends {
266
- // fmt.Printf ("name:%s\nversion:%s\n", extends.FormatProject(ext.Group, ext.Project), ext.Version)
266
+ // log.Debugf ("name:%s\nversion:%s\n", extends.FormatProject(ext.Group, ext.Project), ext.Version)
267
267
// }
268
268
// }
269
269
// if len(response.FailExtends) > 0 {
270
- // fmt.Println ("the extender which are uninstall failed are below:")
270
+ // log.Debug ("the extender which are uninstall failed are below:")
271
271
// for _, ext := range response.FailExtends {
272
- // fmt.Printf ("name: %s, reason: %s\n", extends.FormatProject(ext.Group, ext.Project), ext.Msg)
272
+ // log.Debugf ("name: %s, reason: %s\n", extends.FormatProject(ext.Group, ext.Project), ext.Msg)
273
273
// }
274
274
// }
275
275
//
276
- // fmt.Println ("extender uninstall finish")
276
+ // log.Debug ("extender uninstall finish")
277
277
// return nil
278
278
//}
279
279
//
280
280
//func ExtenderDownload(c *cli.Context) error {
281
281
// for _, id := range c.Args().Slice() {
282
282
// group, name, version, err := extends.DecodeExtenderId(id)
283
283
// if err != nil {
284
- // fmt.Println ("decode extender id error:", err, "id is", id)
284
+ // log.Debug ("decode extender id error:", err, "id is", id)
285
285
// continue
286
286
// }
287
287
// // 当本地不存在当前插件时,从插件市场中下载
@@ -292,7 +292,7 @@ package eoscli
292
292
// }
293
293
// err = extends.DownLoadToRepository(group, name, version)
294
294
// if err != nil {
295
- // fmt.Println ("download extender error:", err, "id is", id)
295
+ // log.Debug ("download extender error:", err, "id is", id)
296
296
// continue
297
297
// }
298
298
// }
@@ -301,7 +301,7 @@ package eoscli
301
301
//
302
302
//func ExtenderInfo(c *cli.Context) error {
303
303
// if c.Args().Len() < 1 {
304
- // fmt.Println ("empty extender id list")
304
+ // log.Debug ("empty extender id list")
305
305
// return nil
306
306
// }
307
307
// for _, id := range c.Args().Slice() {
@@ -320,11 +320,11 @@ package eoscli
320
320
// if info.IsLatest {
321
321
// isLatest = "(latest)"
322
322
// }
323
- // fmt.Printf ("name: %s\n", extends.FormatProject(group, project))
324
- // fmt.Printf ("version: %s %s\n", info.Version, isLatest)
325
- // fmt.Printf ("description:%s\n", info.Description)
326
- // fmt.Printf ("download url:%s\n", info.URL)
327
- // fmt.Printf ("install to run:%s extender install %s\n", os.Args[0], info.ID)
323
+ // log.Debugf ("name: %s\n", extends.FormatProject(group, project))
324
+ // log.Debugf ("version: %s %s\n", info.Version, isLatest)
325
+ // log.Debugf ("description:%s\n", info.Description)
326
+ // log.Debugf ("download url:%s\n", info.URL)
327
+ // log.Debugf ("install to run:%s extender install %s\n", os.Args[0], info.ID)
328
328
// }
329
329
//
330
330
// return nil
0 commit comments