Refactor debug utility

pull/1235/head
Herman Slatman 1 year ago
parent 1c38113e44
commit edee01c80c
No known key found for this signature in database
GPG Key ID: F4D8A44EA0A75A4F

@ -10,13 +10,13 @@ import (
"time"
"github.com/go-chi/chi"
"github.com/ryboe/q"
"github.com/smallstep/certificates/acme"
"github.com/smallstep/certificates/api"
"github.com/smallstep/certificates/api/render"
"github.com/smallstep/certificates/authority"
"github.com/smallstep/certificates/authority/provisioner"
"github.com/smallstep/certificates/utils/debug/q"
)
func link(url, typ string) string {

@ -26,11 +26,11 @@ import (
"time"
"github.com/fxamacker/cbor/v2"
"github.com/smallstep/certificates/authority/provisioner"
"go.step.sm/crypto/jose"
"go.step.sm/crypto/pemutil"
"github.com/ryboe/q"
"github.com/smallstep/certificates/authority/provisioner"
"github.com/smallstep/certificates/utils/debug/q"
)
type ChallengeType string

@ -6,9 +6,11 @@ import (
"time"
"github.com/pkg/errors"
"github.com/ryboe/q"
"github.com/smallstep/certificates/acme"
"github.com/smallstep/nosql"
"github.com/smallstep/certificates/acme"
"github.com/smallstep/certificates/utils/debug/q"
)
type dbChallenge struct {

@ -0,0 +1,13 @@
package q
import (
ryboeq "github.com/ryboe/q"
)
func Q(v ...interface{}) {
// TODO(hs): do or do not call ryboeq.Q based on e.g. debug flag,
// runtime (go run vs. build), based on compiled or not. Goal would be
// to not debug in prod builds at all times. Ideally, never leave a leftover
// call to q.Q in the code, so panic if there is?
ryboeq.Q(v...)
}
Loading…
Cancel
Save