package types
import "github.com/go-logr/zapr/internal/types"
Package types holds a copy of the ObjectRef type from klog for use in the example.
Index ¶
Types ¶
type ObjectRef ¶
ObjectRef references a Kubernetes object
func (ObjectRef) MarshalLog ¶
func (ref ObjectRef) MarshalLog() interface{}
MarshalLog ensures that loggers with structured output ignore the String method.
We implement fmt.Stringer for non-structured logging, but we want the raw struct when using structured logs. Some logr implementations call String if it is present, so we want to convert this struct to something that doesn't have that method.
func (ObjectRef) String ¶
Source Files ¶
- Version
- v1.3.0 (latest)
- Published
- Nov 3, 2023
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- 20 minutes ago –
Tools for package owners.