Drone CI and linting (#14)
This commit is contained in:
@@ -18,7 +18,9 @@ func throwGoImports(ec echo.Context) error {
|
||||
// to list available packages.
|
||||
// For now only package itself is supported, all other features in ToDo.
|
||||
packageNameRaw := ec.Request().URL.Path
|
||||
|
||||
pkgs, errs := configuration.Cfg.GetPackagesInfo([]string{packageNameRaw})
|
||||
|
||||
if errs != nil {
|
||||
log.Error().Str("package", packageNameRaw).Msgf("Failed to get package information: %+v", errs)
|
||||
return ec.JSON(http.StatusBadRequest, &structs.Reply{Status: structs.StatusFailure, Errors: errs})
|
||||
|
@@ -24,7 +24,9 @@ func packagesGET(ec echo.Context) error {
|
||||
log.Info().Msgf("Received package(s) info get request: %+v", req)
|
||||
|
||||
var pkgs map[string]*structs.Package
|
||||
|
||||
var errors []structs.Error
|
||||
|
||||
if req.All {
|
||||
pkgs = configuration.Cfg.GetAllPackagesInfo()
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user