faillint icon indicating copy to clipboard operation
faillint copied to clipboard

Possibility to detect function from a struct

Open titpetric opened this issue 5 years ago • 0 comments

I'd like a way to block github.com/jmoiron/sqlx, struct DB, function Select, Exec, Must*

  • Must* functions are dangerous in a service context (assuming you don't have recover middleware)
  • Select, Exec, and a few others don't take a context, we need to use *Context( for cancellation aware versions.

The issue is that these aren't top level functions or vars, but are nested inside an *sqlx.DB.

Wanted expression:

github.com/jmoiron/sqlx.DB.{Select,Exec,Must*}

titpetric avatar Jul 13 '20 15:07 titpetric