Browse files

fixes for 06/09 go weekly

  • Loading branch information...
1 parent bb23e0e commit 78e9b5a6be2091a7213b0e08a0b248291cf12d70 @uwedeportivo committed Jun 11, 2011
Showing with 10 additions and 6 deletions.
  1. +3 −1 goclient/kindi/bitmap.go
  2. +4 −2 goclient/kindi/keychain.go
  3. +3 −3 goclient/kindi/picasa.go
View
4 goclient/kindi/bitmap.go
@@ -70,7 +70,9 @@ func (pi *payloadImage) b(i int) byte {
}
func (pi *payloadImage) At(x, y int) image.Color {
- if !pi.bounds.Contains(image.Point{x, y}) {
+ p := image.Point{x, y}
+
+ if !p.In(pi.bounds) {
return image.NRGBAColor{}
}
View
6 goclient/kindi/keychain.go
@@ -30,10 +30,12 @@
package kindi
import (
+ "big"
"bytes"
"crypto/rsa"
"crypto/rand"
"crypto/x509"
+ "crypto/x509/pkix"
"encoding/pem"
"fmt"
"io/ioutil"
@@ -198,8 +200,8 @@ func Generate(certoutPath, pngoutPath, keyoutPath string) os.Error {
now := time.Seconds()
template := x509.Certificate{
- SerialNumber: []byte{0},
- Subject: x509.Name{
+ SerialNumber: big.NewInt(0),
+ Subject: pkix.Name{
CommonName: "kindi",
Organization: []string{"codemanic.com"},
},
View
6 goclient/kindi/picasa.go
@@ -64,7 +64,7 @@ func jsonPath(object interface{}, path string) interface{} {
func fetchKindiAlbumId(user string) (string, os.Error) {
url := "https://picasaweb.google.com/data/feed/api/user/" + user + "?alt=json"
- httpResponse, _, err := http.DefaultClient.Get(url)
+ httpResponse, err := http.DefaultClient.Get(url)
if err != nil {
return "", err
}
@@ -129,7 +129,7 @@ func fetchImageURL(user string) (string, os.Error) {
url := "https://picasaweb.google.com/data/feed/api/user/" + user + "/albumid/" + albumId + "?alt=json"
- httpResponse, _, err := http.DefaultClient.Get(url)
+ httpResponse, err := http.DefaultClient.Get(url)
if err != nil {
return "", err
}
@@ -179,7 +179,7 @@ func fetchCertBytes(user string) ([]byte, os.Error) {
return nil, nil
}
- httpResponse, _, err := http.DefaultClient.Get(imageURL)
+ httpResponse, err := http.DefaultClient.Get(imageURL)
if err != nil {
return nil, err
}

0 comments on commit 78e9b5a

Please sign in to comment.