abiao преди 4 години
родител
ревизия
4bde27f122
променени са 1 файла, в които са добавени 0 реда и са изтрити 7 реда
  1. 0 7
      go/gopath/src/github.com/chanxuehong/wechat/mch/sign.go

+ 0 - 7
go/gopath/src/github.com/chanxuehong/wechat/mch/sign.go

@@ -10,7 +10,6 @@ import (
 	"crypto/md5"
 	"crypto/md5"
 	"crypto/sha1"
 	"crypto/sha1"
 	"encoding/hex"
 	"encoding/hex"
-	"fmt"
 	"hash"
 	"hash"
 	"sort"
 	"sort"
 )
 )
@@ -35,15 +34,11 @@ func Sign(parameters map[string]string, apiKey string, fn func() hash.Hash) stri
 	h := fn()
 	h := fn()
 
 
 	buf := make([]byte, 256)
 	buf := make([]byte, 256)
-	fmt.Printf("begin------")
 	for _, k := range ks {
 	for _, k := range ks {
 		v := parameters[k]
 		v := parameters[k]
 		if v == "" {
 		if v == "" {
 			continue
 			continue
 		}
 		}
-
-		fmt.Printf("map---%s=>%s\n", k, v)
-
 		buf = buf[:0]
 		buf = buf[:0]
 		buf = append(buf, k...)
 		buf = append(buf, k...)
 		buf = append(buf, '=')
 		buf = append(buf, '=')
@@ -51,9 +46,7 @@ func Sign(parameters map[string]string, apiKey string, fn func() hash.Hash) stri
 		buf = append(buf, '&')
 		buf = append(buf, '&')
 		h.Write(buf)
 		h.Write(buf)
 	}
 	}
-	fmt.Printf("end------")
 	buf = buf[:0]
 	buf = buf[:0]
-
 	buf = append(buf, "key="...)
 	buf = append(buf, "key="...)
 	buf = append(buf, apiKey...)
 	buf = append(buf, apiKey...)
 	h.Write(buf)
 	h.Write(buf)