ckaznocha/marathon-resource

View on GitHub

Showing 8 of 8 total issues

Function main has 51 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func main() {
    var (
        err     error
        input   behaviors.InputJSON
        output  interface{}
Severity: Minor
Found in cmd/marathon-resource/main.go - About 1 hr to fix

Function Out has 9 return statements (exceeds 4 allowed).
Open

func Out(input InputJSON, appJSONPath string, apiclient marathon.Marathoner) (IOOutput, error) {

    jsondata, err := parsePayload(input.Params, appJSONPath)
    if err != nil {
        return IOOutput{}, err
Severity: Major
Found in cmd/marathon-resource/behaviors/behaviors.go - About 55 mins to fix

Method marathon.handleReq has 6 return statements (exceeds 4 allowed).
Open

func (m *marathon) handleReq(
    method string,
    resourcePath string,
    payload io.Reader,
    wantCodes []int,
Severity: Major
Found in cmd/marathon-resource/marathon/marathon.go - About 40 mins to fix

Function NewMarathoner has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    client doer,
    uri *url.URL,
    auth *AuthCreds,
    apiToken string,
    logger logrus.FieldLogger) Marathoner {
Severity: Minor
Found in cmd/marathon-resource/marathon/marathon.go - About 35 mins to fix

Method marathon.handleReq has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    method string,
    resourcePath string,
    payload io.Reader,
    wantCodes []int,
    resObj interface{},
Severity: Minor
Found in cmd/marathon-resource/marathon/marathon.go - About 35 mins to fix

Function NewerTimestamps has 5 return statements (exceeds 4 allowed).
Open

func NewerTimestamps(
    timestampStrings []string,
    currentTimestampString string,
) ([]string, error) {
    var (
Severity: Major
Found in cmd/marathon-resource/dates/dates.go - About 35 mins to fix

Function parsePayload has 5 return statements (exceeds 4 allowed).
Open

func parsePayload(p Params, path string) (io.Reader, error) {
    var (
        replacements = map[string]string{}
        buf          = bytes.NewBuffer([]byte{})
    )
Severity: Major
Found in cmd/marathon-resource/behaviors/template.go - About 35 mins to fix

2: cannot find package "github.com/ckaznocha/marathon-resource/cmd/marathon-resource/marathon" in any of:
Open

    "github.com/ckaznocha/marathon-resource/cmd/marathon-resource/marathon"
Severity
Category
Status
Source
Language