Skip to content

Commit

Permalink
Apparently Deprecated can't be all-uppercase to get IDE linting
Browse files Browse the repository at this point in the history
  • Loading branch information
francislavoie committed Oct 13, 2024
1 parent 43045cd commit bc474ac
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion modules/caddyhttp/caddyhttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func init() {
// A route matcher MUST NOT modify the request, with the
// only exception being its context.
//
// DEPRECATED: Matchers should now implement RequestMatcherWithError.
// Deprecated: Matchers should now implement RequestMatcherWithError.
// You may remove any interface guards for RequestMatcher
// but keep your Match() methods for backwards compatibility.
type RequestMatcher interface {
Expand Down
2 changes: 1 addition & 1 deletion modules/caddyhttp/celmatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ func CELMatcherImpl(macroName, funcName string, matcherDataTypes []*cel.Type, fa
}

// CELMatcherFactory converts a constant CEL value into a RequestMatcher.
// DEPRECATED: Use CELMatcherWithErrorFactory instead.
// Deprecated: Use CELMatcherWithErrorFactory instead.
type CELMatcherFactory = func(data ref.Val) (RequestMatcher, error)

// CELMatcherWithErrorFactory converts a constant CEL value into a RequestMatcherWithError.
Expand Down
2 changes: 1 addition & 1 deletion modules/caddyhttp/matchers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,7 @@ const regexpPlaceholderPrefix = "http.regexp"
// to short-circuit the handler chain, since matchers cannot
// return errors via the RequestMatcher interface.
//
// DEPRECATED: Matchers should implement RequestMatcherWithError
// Deprecated: Matchers should implement RequestMatcherWithError
// which can return an error directly, instead of smuggling it
// through the vars map.
const MatcherErrorVarKey = "matchers.error"
Expand Down
2 changes: 1 addition & 1 deletion modules/caddyhttp/reverseproxy/healthchecks.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type HealthChecks struct {
// health checks (that is, health checks which occur in a
// background goroutine independently).
type ActiveHealthChecks struct {
// DEPRECATED: Use 'uri' instead. This field will be removed. TODO: remove this field
// Deprecated: Use 'uri' instead. This field will be removed. TODO: remove this field
Path string `json:"path,omitempty"`

// The URI (path and query) to use for health checks
Expand Down
4 changes: 2 additions & 2 deletions modules/caddyhttp/reverseproxy/httptransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,11 +545,11 @@ type TLSConfig struct {
// Certificate authority module which provides the certificate pool of trusted certificates
CARaw json.RawMessage `json:"ca,omitempty" caddy:"namespace=tls.ca_pool.source inline_key=provider"`

// DEPRECATED: Use the `ca` field with the `tls.ca_pool.source.inline` module instead.
// Deprecated: Use the `ca` field with the `tls.ca_pool.source.inline` module instead.
// Optional list of base64-encoded DER-encoded CA certificates to trust.
RootCAPool []string `json:"root_ca_pool,omitempty"`

// DEPRECATED: Use the `ca` field with the `tls.ca_pool.source.file` module instead.
// Deprecated: Use the `ca` field with the `tls.ca_pool.source.file` module instead.
// List of PEM-encoded CA certificate files to add to the same trust
// store as RootCAPool (or root_ca_pool in the JSON).
RootCAPEMFiles []string `json:"root_ca_pem_files,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions modules/caddytls/connpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,21 +535,21 @@ type ClientAuthentication struct {
CARaw json.RawMessage `json:"ca,omitempty" caddy:"namespace=tls.ca_pool.source inline_key=provider"`
ca CA

// DEPRECATED: Use the `ca` field with the `tls.ca_pool.source.inline` module instead.
// Deprecated: Use the `ca` field with the `tls.ca_pool.source.inline` module instead.
// A list of base64 DER-encoded CA certificates
// against which to validate client certificates.
// Client certs which are not signed by any of
// these CAs will be rejected.
TrustedCACerts []string `json:"trusted_ca_certs,omitempty"`

// DEPRECATED: Use the `ca` field with the `tls.ca_pool.source.file` module instead.
// Deprecated: Use the `ca` field with the `tls.ca_pool.source.file` module instead.
// TrustedCACertPEMFiles is a list of PEM file names
// from which to load certificates of trusted CAs.
// Client certificates which are not signed by any of
// these CA certificates will be rejected.
TrustedCACertPEMFiles []string `json:"trusted_ca_certs_pem_files,omitempty"`

// DEPRECATED: This field is deprecated and will be removed in
// Deprecated: This field is deprecated and will be removed in
// a future version. Please use the `validators` field instead
// with the tls.client_auth.verifier.leaf module instead.
//
Expand Down
2 changes: 1 addition & 1 deletion modules/caddytls/ondemand.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func init() {
// to your application whether a particular domain is allowed
// to have a certificate issued for it.
type OnDemandConfig struct {
// DEPRECATED. WILL BE REMOVED SOON. Use 'permission' instead with the `http` module.
// Deprecated. WILL BE REMOVED SOON. Use 'permission' instead with the `http` module.
Ask string `json:"ask,omitempty"`

// REQUIRED. A module that will determine whether a
Expand Down

0 comments on commit bc474ac

Please sign in to comment.