mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Style fixups
This commit is contained in:
@@ -395,6 +395,4 @@ func (l *PackageRefList) FilterLatestRefs() {
|
|||||||
|
|
||||||
lastArch, lastName, lastVer = arch, name, ver
|
lastArch, lastName, lastVer = arch, name, ver
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -198,7 +198,7 @@ func (repo *RemoteRepo) IndexesRootURL() *url.URL {
|
|||||||
if !repo.IsFlat() {
|
if !repo.IsFlat() {
|
||||||
path = &url.URL{Path: fmt.Sprintf("dists/%s/", repo.Distribution)}
|
path = &url.URL{Path: fmt.Sprintf("dists/%s/", repo.Distribution)}
|
||||||
} else {
|
} else {
|
||||||
path = &url.URL{Path: fmt.Sprintf("%s", repo.Distribution)}
|
path = &url.URL{Path: repo.Distribution}
|
||||||
}
|
}
|
||||||
|
|
||||||
return repo.archiveRootURL.ResolveReference(path)
|
return repo.archiveRootURL.ResolveReference(path)
|
||||||
|
|||||||
+4
-8
@@ -1,10 +1,6 @@
|
|||||||
package query
|
package query
|
||||||
|
|
||||||
import (
|
import . "gopkg.in/check.v1"
|
||||||
"fmt"
|
|
||||||
|
|
||||||
. "gopkg.in/check.v1"
|
|
||||||
)
|
|
||||||
|
|
||||||
type LexerSuite struct {
|
type LexerSuite struct {
|
||||||
}
|
}
|
||||||
@@ -46,13 +42,13 @@ func (s *LexerSuite) TestConsume(c *C) {
|
|||||||
func (s *LexerSuite) TestString(c *C) {
|
func (s *LexerSuite) TestString(c *C) {
|
||||||
l, _ := lex("query", "package (<< 1.3)")
|
l, _ := lex("query", "package (<< 1.3)")
|
||||||
|
|
||||||
c.Check(fmt.Sprintf("%s", l.Current()), Equals, "\"package\"")
|
c.Check(l.Current().String(), Equals, "\"package\"")
|
||||||
l.Consume()
|
l.Consume()
|
||||||
c.Check(fmt.Sprintf("%s", l.Current()), Equals, "(")
|
c.Check(l.Current().String(), Equals, "(")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *LexerSuite) TestError(c *C) {
|
func (s *LexerSuite) TestError(c *C) {
|
||||||
l, _ := lex("query", "'package")
|
l, _ := lex("query", "'package")
|
||||||
|
|
||||||
c.Check(fmt.Sprintf("%s", l.Current()), Equals, "error: unexpected eof in quoted string")
|
c.Check(l.Current().String(), Equals, "error: unexpected eof in quoted string")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user