@@ -29,11 +29,6 @@ import (
29
29
// bind command line flags to the instance before passing it to NewTestContext.
30
30
//
31
31
// Must be constructed with NewConfig.
32
- //
33
- // # Experimental
34
- //
35
- // Notice: This type is EXPERIMENTAL and may be changed or removed in a
36
- // later release.
37
32
type Config struct {
38
33
vstate * verbosity.VState
39
34
co configOptions
@@ -54,11 +49,6 @@ func (c *Config) VModule() flag.Value {
54
49
}
55
50
56
51
// ConfigOption implements functional parameters for NewConfig.
57
- //
58
- // # Experimental
59
- //
60
- // Notice: This type is EXPERIMENTAL and may be changed or removed in a
61
- // later release.
62
52
type ConfigOption func (co * configOptions )
63
53
64
54
type configOptions struct {
@@ -72,23 +62,13 @@ type configOptions struct {
72
62
// AnyToString overrides the default formatter for values that are not
73
63
// supported directly by klog. The default is `fmt.Sprintf("%+v")`.
74
64
// The formatter must not panic.
75
- //
76
- // # Experimental
77
- //
78
- // Notice: This function is EXPERIMENTAL and may be changed or removed in a
79
- // later release.
80
65
func AnyToString (anyToString func (value interface {}) string ) ConfigOption {
81
66
return func (co * configOptions ) {
82
67
co .anyToString = anyToString
83
68
}
84
69
}
85
70
86
71
// VerbosityFlagName overrides the default -testing.v for the verbosity level.
87
- //
88
- // # Experimental
89
- //
90
- // Notice: This function is EXPERIMENTAL and may be changed or removed in a
91
- // later release.
92
72
func VerbosityFlagName (name string ) ConfigOption {
93
73
return func (co * configOptions ) {
94
74
co .verbosityFlagName = name
@@ -97,11 +77,6 @@ func VerbosityFlagName(name string) ConfigOption {
97
77
98
78
// VModulFlagName overrides the default -testing.vmodule for the per-module
99
79
// verbosity levels.
100
- //
101
- // # Experimental
102
- //
103
- // Notice: This function is EXPERIMENTAL and may be changed or removed in a
104
- // later release.
105
80
func VModuleFlagName (name string ) ConfigOption {
106
81
return func (co * configOptions ) {
107
82
co .vmoduleFlagName = name
@@ -114,11 +89,6 @@ func VModuleFlagName(name string) ConfigOption {
114
89
// https://github.com/kubernetes/community/blob/9406b4352fe2d5810cb21cc3cb059ce5886de157/contributors/devel/sig-instrumentation/logging.md#logging-conventions),
115
90
// which is useful when debugging a failed test. `go test` only shows the log
116
91
// output for failed tests. To see all output, use `go test -v`.
117
- //
118
- // # Experimental
119
- //
120
- // Notice: This function is EXPERIMENTAL and may be changed or removed in a
121
- // later release.
122
92
func Verbosity (level int ) ConfigOption {
123
93
return func (co * configOptions ) {
124
94
co .verbosityDefault = level
@@ -129,11 +99,6 @@ func Verbosity(level int) ConfigOption {
129
99
// to being printed. Off by default. Unit tests that want to verify that
130
100
// log entries are emitted as expected can turn this on and then retrieve
131
101
// the captured log through the Underlier LogSink interface.
132
- //
133
- // # Experimental
134
- //
135
- // Notice: This function is EXPERIMENTAL and may be changed or removed in a
136
- // later release.
137
102
func BufferLogs (enabled bool ) ConfigOption {
138
103
return func (co * configOptions ) {
139
104
co .bufferLogs = enabled
@@ -142,11 +107,6 @@ func BufferLogs(enabled bool) ConfigOption {
142
107
143
108
// NewConfig returns a configuration with recommended defaults and optional
144
109
// modifications. Command line flags are not bound to any FlagSet yet.
145
- //
146
- // # Experimental
147
- //
148
- // Notice: This function is EXPERIMENTAL and may be changed or removed in a
149
- // later release.
150
110
func NewConfig (opts ... ConfigOption ) * Config {
151
111
c := & Config {
152
112
co : configOptions {
@@ -165,11 +125,6 @@ func NewConfig(opts ...ConfigOption) *Config {
165
125
}
166
126
167
127
// AddFlags registers the command line flags that control the configuration.
168
- //
169
- // # Experimental
170
- //
171
- // Notice: This function is EXPERIMENTAL and may be changed or removed in a
172
- // later release.
173
128
func (c * Config ) AddFlags (fs * flag.FlagSet ) {
174
129
fs .Var (c .vstate .V (), c .co .verbosityFlagName , "number for the log level verbosity of the testing logger" )
175
130
fs .Var (c .vstate .VModule (), c .co .vmoduleFlagName , "comma-separated list of pattern=N log level settings for files matching the patterns" )
0 commit comments