Skip to content

Too verbose error message when using Validate #332

Description

@mitar

This might be nitpicking, but a simple program:

package main

import (
	"errors"

	"github.com/alecthomas/kong"
)

type Config struct{}

func (c Config) Validate() error {
	return errors.New("foobar")
}

func main() {
	var config Config
	kong.Parse(&config)
}

Outputs:

play: error: play: foobar

I find that double play in there ugly and unnecessary. Could it be removed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions