Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ParseId -> ParseID
  • Loading branch information
felixge committed Feb 20, 2015
1 parent 498220b commit 4a5723d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions format.go
Expand Up @@ -94,7 +94,7 @@ func (f *defaultFormat) DecodeTree(r io.Reader) (Tree, error) {
return nil, err
} else if id, err := b.ReadString(' '); err != nil {
return nil, err
} else if id, err := ParseId(id[:len(id)-1]); err != nil {
} else if id, err := ParseID(id[:len(id)-1]); err != nil {
return nil, err
} else if nameLen, err := b.ReadString(' '); err != nil {
return nil, err
Expand Down Expand Up @@ -154,13 +154,13 @@ fields:
field = field[:len(field)-1]
switch field {
case "tree":
if id, err := ParseId(val); err != nil {
if id, err := ParseID(val); err != nil {
return commit, err
} else {
commit.Tree = id
}
case "parent":
if id, err := ParseId(val); err != nil {
if id, err := ParseID(val); err != nil {
return commit, err
} else {
commit.Parents = append(commit.Parents, id)
Expand Down
4 changes: 2 additions & 2 deletions repo.go
Expand Up @@ -32,7 +32,7 @@ type Repo interface {
}

// ParseID parses the given hex id string into an ID, or returns an error.
func ParseId(id string) (ID, error) {
func ParseID(id string) (ID, error) {
if id == "" {
return nil, nil
} else if d, err := hex.DecodeString(id); err != nil {
Expand All @@ -44,7 +44,7 @@ func ParseId(id string) (ID, error) {

// MustID returns the ID for the given hex id, or panics on error.
func MustID(id string) ID {
r, err := ParseId(id)
r, err := ParseID(id)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 4a5723d

Please sign in to comment.