Skip to content

Commit

Permalink
siva: typos and formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Javi Fontan <jfontan@gmail.com>
  • Loading branch information
jfontan committed Mar 12, 2019
1 parent c2933ad commit fe7dd8c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion siva/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For example:
loc, _ := library.AddLocation("test")
r1, _ := loc.Init("repo1") # the first repo initializes the git repository
r1.Commit()
r2, := loc.Init("repos2) # the second just adds a new remote
r2, _ := loc.Init("repos2") # the second just adds a new remote
r2.Commit()
loc.Has("repo1") # true
loc.Has("repo2") # true
Expand Down
1 change: 0 additions & 1 deletion siva/library.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ func (l *Library) GetOrInit(borges.RepositoryID) (borges.Repository, error) {
return nil, borges.ErrNotImplemented.New()
}

// TODO: find if we have to use ".git" suffix for repository ids
func toRepoID(endpoint string) borges.RepositoryID {
name, _ := borges.NewRepositoryID(endpoint)
return borges.RepositoryID(strings.TrimSuffix(name.String(), ".git"))
Expand Down
5 changes: 1 addition & 4 deletions siva/location.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,7 @@ func (l *Location) Init(id borges.RepositoryID) (borges.Repository, error) {
}

// Get implements the borges.Location interface.
func (l *Location) Get(
id borges.RepositoryID,
mode borges.Mode,
) (borges.Repository, error) {
func (l *Location) Get(id borges.RepositoryID, mode borges.Mode) (borges.Repository, error) {
has, err := l.Has(id)
if err != nil {
return nil, err
Expand Down

0 comments on commit fe7dd8c

Please sign in to comment.