File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 - Move ICO specific conversion from PNG to ICO. PNG struct stick to spec.
3232- v2.0.3
3333 - update go-helper/v2
34+ - v2.0.4
35+ - update go-helper/v2
36+ - update root.go
Original file line number Diff line number Diff line change @@ -69,15 +69,14 @@ var rootCmd = &cobra.Command{
6969
7070 },
7171 Run : func (cmd * cobra.Command , args []string ) {
72- var icoFile string
73- if errs . IsEmpty () {
72+ var (
73+ ico * p2i. ICO
7474 icoFile = args [len (args )- 1 ]
75- }
76- ico := new (p2i. ICO ). New ( icoFile )
75+ pngNum = len ( args ) - 1
76+ )
7777 if errs .IsEmpty () {
78- // Add PNGs into ico struct
79- pngc := len (args ) - 1
80- for i := range pngc {
78+ ico = new (p2i.ICO ).New (icoFile )
79+ for i := range pngNum {
8180 if ico .Err != nil {
8281 break
8382 }
@@ -86,9 +85,6 @@ var rootCmd = &cobra.Command{
8685 ezlog .Log ().N ("Add" ).M (args [i ]).Out ()
8786 }
8887 }
89- errs .Queue ("" , ico .Err )
90- }
91- if errs .IsEmpty () {
9288 ico .Write ()
9389 errs .Queue ("" , ico .Err )
9490 }
@@ -98,7 +94,7 @@ var rootCmd = &cobra.Command{
9894 },
9995 PersistentPostRun : func (cmd * cobra.Command , args []string ) {
10096 if errs .NotEmpty () {
101- ezlog .Err ().L ().M (errs .Errs ).Out ()
97+ ezlog .Err ().L ().M (errs .Errs () ).Out ()
10298 cmd .Usage ()
10399 }
104100 },
Original file line number Diff line number Diff line change @@ -23,5 +23,5 @@ THE SOFTWARE.
2323package p2i
2424
2525const (
26- Version = "v2.0.3 "
26+ Version = "v2.0.4 "
2727)
You can’t perform that action at this time.
0 commit comments