Skip to content

Possibility to detect function from a struct #18

@titpetric

Description

@titpetric

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*}

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