@@ -130,6 +130,9 @@ func toSum(input chan Result) string {
130130 if hasHash (HashNames .Sha3512 ) {
131131 str .WriteString (res .Sha3512 + " " + res .File + "\n " )
132132 }
133+ if hasHash (HashNames .Ed2k ) {
134+ str .WriteString (res .Ed2k + " " + res .File + "\n " )
135+ }
133136
134137 if ! NoStream && FileOutput == "" {
135138 fmt .Print (str .String ())
@@ -187,6 +190,9 @@ func toHashOnly(input chan Result) (string, bool) {
187190 if hasHash (HashNames .Sha3512 ) {
188191 str .WriteString (res .Sha3512 + "\n " )
189192 }
193+ if hasHash (HashNames .Ed2k ) {
194+ str .WriteString (res .Ed2k + "\n " )
195+ }
190196
191197 if ! NoStream && FileOutput == "" {
192198 fmt .Print (str .String ())
@@ -253,6 +259,9 @@ func toText(input chan Result) (string, bool) {
253259 if hasHash (HashNames .Sha3512 ) {
254260 str .WriteString (" SHA3-512 " + res .Sha3512 + "\n " )
255261 }
262+ if hasHash (HashNames .Ed2k ) {
263+ str .WriteString (" ed2k " + res .Ed2k + "\n " )
264+ }
256265
257266 if ! NoStream && FileOutput == "" {
258267 fmt .Print (str .String ())
@@ -371,6 +380,7 @@ func toSqlite(input chan Result) (string, bool) {
371380 Sha3256 : toSqlNull (res .Sha3256 ),
372381 Sha3384 : toSqlNull (res .Sha3384 ),
373382 Sha3512 : toSqlNull (res .Sha3512 ),
383+ Ed2k : toSqlNull (res .Ed2k ),
374384 Size : res .Bytes ,
375385 })
376386 if err != nil {
@@ -427,6 +437,7 @@ func printHashes() {
427437 fmt .Printf (" SHA3-256 (%s)\n " , HashNames .Sha3256 )
428438 fmt .Printf (" SHA3-384 (%s)\n " , HashNames .Sha3384 )
429439 fmt .Printf (" SHA3-512 (%s)\n " , HashNames .Sha3512 )
440+ fmt .Printf (" ed2k (%s)\n " , HashNames .Ed2k )
430441}
431442
432443func contains (list []string , v string ) bool {
0 commit comments