mirror of
https://github.com/gomods/athens
synced 2026-02-03 14:20:31 +00:00
Adding travis CI config (#28)
* Adding travis CI config * not using the make target * Fixing a bug Hooray CI!
This commit is contained in:
committed by
Brian Ketelsen
parent
c0749c3725
commit
8f0686e076
@@ -0,0 +1,7 @@
|
||||
language: go
|
||||
install: false
|
||||
go:
|
||||
- "1.8"
|
||||
- "1.9"
|
||||
- "1.10.x"
|
||||
script: go test ./...
|
||||
@@ -1,18 +0,0 @@
|
||||
package actions
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gobuffalo/buffalo"
|
||||
"github.com/gomods/athens/pkg/storage"
|
||||
)
|
||||
|
||||
func allHandler(lister storage.Lister) func(buffalo.Context) error {
|
||||
return func(c buffalo.Context) error {
|
||||
revInfos, err := lister.All()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return c.Render(http.StatusOK, r.JSON(&revInfos))
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,6 @@ func App() *buffalo.App {
|
||||
app.Use(GoGet())
|
||||
app.GET("/", homeHandler)
|
||||
|
||||
app.GET("/all", allHandler(storageReader))
|
||||
app.GET("/{base_url:.+}/{module}/@v/list", listHandler(storageReader))
|
||||
app.GET("/{base_url:.+}/{module}/@v/{version}.info", versionInfoHandler(storageReader))
|
||||
app.GET("/{base_url:.+}/{module}/@v/{version}.mod", versionModuleHandler(storageReader))
|
||||
|
||||
Reference in New Issue
Block a user