Skip to content

Simplified API in the future? Goweb use too many []interface{} for args #71

Description

@nvcnvn

I'm going to use Goweb for the next project, after reading the API document I feel Goweb use too many ...interface{} for the function agrs. I give some flexible but sometime give some confusions.
Why don't we just provide the most general API for the function?
For example, goweb.Map should be:

func Map(fn func(c context.Context) error, path string, methods []string, matchers []handlers.MatcherFunc) (handlers.Handler, error)

or goweb.MapController should be just:

func MapController(controller interface{}, path string) error

I know this is not that importan and hard to change because you will break your old code but it still worth something! I bet that many of us love Go because the simplicity and clarity (by the lack of function overloading and something else)

Thanks for the team for your great package!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions