podhmo / apikit

api toolkit (WIP)
MIT License
0 stars 0 forks source link

relax handling the way that function argument's name #131

Open podhmo opened 3 years ago

podhmo commented 3 years ago

currently implementation requires always each of function-with-extra-dependencies and consumer's arguments is same name.

e.g.

consumer

func Use(req *http.Request) (T, error) {
....
}

function with extra dependencies

// this is bad, the name of argument is "r". not "req".
func LoginRequired(r *http.Request) error {
  ..
}

related issue