Skip to content

Commit

Permalink
fixes for 06/09 go weekly
Browse files Browse the repository at this point in the history
  • Loading branch information
uwedeportivo committed Jun 12, 2011
1 parent bb23e0e commit 78e9b5a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 3 additions & 1 deletion goclient/kindi/bitmap.go
Expand Up @@ -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{}
}

Expand Down
6 changes: 4 additions & 2 deletions goclient/kindi/keychain.go
Expand Up @@ -30,10 +30,12 @@
package kindi

import (
"big"
"bytes"
"crypto/rsa"
"crypto/rand"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
"io/ioutil"
Expand Down Expand Up @@ -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"},
},
Expand Down
6 changes: 3 additions & 3 deletions goclient/kindi/picasa.go
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 78e9b5a

Please sign in to comment.