This repository was archived by the owner on Sep 11, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 6
6
- 1.5
7
7
- tip
8
8
9
- script :
9
+ install :
10
+ - rm -rf $GOPATH/src/gopkg.in/src-d
11
+ - mkdir -p $GOPATH/src/gopkg.in/src-d
12
+ - ln -s $PWD $GOPATH/src/gopkg.in/src-d/go-git.v1
10
13
- go get -v -t ./...
11
- - go test
14
+
15
+ script :
16
+ - go test -v ./...
Original file line number Diff line number Diff line change 7
7
"net/url"
8
8
"strings"
9
9
10
- "github.com/src-d/crawler/clients/common"
11
- "github.com/src-d/crawler/clients/git/pktline"
10
+ "gopkg.in/src-d/go-git.v1/pktline"
12
11
13
12
"github.com/sourcegraph/go-vcsurl"
14
13
)
@@ -36,7 +35,7 @@ func (c *Client) Refs() (*Refs, error) {
36
35
}
37
36
38
37
if res .StatusCode >= 400 {
39
- return nil , & common. ErrNotFound {c .url }
38
+ return nil , & ErrNotFound {c .url }
40
39
}
41
40
42
41
defer res .Body .Close ()
@@ -167,3 +166,15 @@ func (r *Refs) DefaultBranchCommit() string {
167
166
func (r * Refs ) Branches () map [string ]string {
168
167
return r .branches
169
168
}
169
+
170
+ type ErrNotFound struct {
171
+ url string
172
+ }
173
+
174
+ func (e * ErrNotFound ) Url () string {
175
+ return e .url
176
+ }
177
+
178
+ func (e * ErrNotFound ) Error () string {
179
+ return fmt .Sprintf ("Unable to find %q" , e .url )
180
+ }
Original file line number Diff line number Diff line change 7
7
"strconv"
8
8
"time"
9
9
10
- "github.com /src-d/crawler/clients/ git/commons"
10
+ "gopkg.in /src-d/go- git.v1 /commons"
11
11
)
12
12
13
13
type Object interface {
You can’t perform that action at this time.
0 commit comments