use Go style, not mixing acronym case

Change-Id: Id3a741c9f5106899dea08b6efcb167b39c83f61e
This commit is contained in:
Brad Fitzpatrick 2011-11-27 14:06:12 -05:00
parent d1fc9afec0
commit a79893b370
4 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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}
}

View File

@ -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