diff --git a/lib/go/camli/blobref/blobref.go b/lib/go/camli/blobref/blobref.go index f5f8980fa..31113afe9 100644 --- a/lib/go/camli/blobref/blobref.go +++ b/lib/go/camli/blobref/blobref.go @@ -162,7 +162,7 @@ func FromHash(hashfunc string, h hash.Hash) *BlobRef { return newBlob(hashfunc, fmt.Sprintf("%x", h.Sum())) } -func Sha1FromString(s string) *BlobRef { +func SHA1FromString(s string) *BlobRef { s1 := sha1.New() s1.Write([]byte(s)) return FromHash("sha1", s1) diff --git a/lib/go/camli/client/config.go b/lib/go/camli/client/config.go index 6250e2981..dc4fa04c2 100644 --- a/lib/go/camli/client/config.go +++ b/lib/go/camli/client/config.go @@ -158,7 +158,7 @@ func SignerPublicKeyBlobref() *blobref.BlobRef { return nil } - br := blobref.Sha1FromString(armored) + br := blobref.SHA1FromString(armored) pubFile := filepath.Join(selfPubKeyDir, br.String()+".camli") log.Printf("key file: %q", pubFile) diff --git a/lib/go/camli/client/upload.go b/lib/go/camli/client/upload.go index df67ed8ea..17dff2304 100644 --- a/lib/go/camli/client/upload.go +++ b/lib/go/camli/client/upload.go @@ -147,7 +147,7 @@ func parseStatResponse(r io.Reader) (sr *statResponse, outerr os.Error) { } func NewUploadHandleFromString(data string) *UploadHandle { - bref := blobref.Sha1FromString(data) + bref := blobref.SHA1FromString(data) r := strings.NewReader(data) return &UploadHandle{BlobRef: bref, Size: int64(len(data)), Contents: r} } diff --git a/lib/go/camli/schema/filewriter.go b/lib/go/camli/schema/filewriter.go index 46a50d5ba..9d9d748b6 100644 --- a/lib/go/camli/schema/filewriter.go +++ b/lib/go/camli/schema/filewriter.go @@ -93,7 +93,7 @@ func WriteFileMap(bs blobserver.StatReceiver, fileMap map[string]interface{}, r if err != nil { return nil, err } - br := blobref.Sha1FromString(json) + br := blobref.SHA1FromString(json) sb, err := bs.ReceiveBlob(br, strings.NewReader(json)) if err != nil { return nil, err @@ -150,7 +150,7 @@ func WriteFileMapRolling(bs blobserver.StatReceiver, fileMap map[string]interfac buf := new(bytes.Buffer) uploadString := func(s string) (*blobref.BlobRef, os.Error) { - br := blobref.Sha1FromString(s) + br := blobref.SHA1FromString(s) hasIt, err := serverHasBlob(bs, br) if err != nil { return nil, err