@@ -184,7 +184,7 @@ func Example_openTelemetryMetric() {
184
184
// helloWorld shutdown
185
185
}
186
186
187
- // This example demonstrates how to use [kod.WithInterceptors ] to provide global interceptors to the application.
187
+ // This example demonstrates how to use [kod.Kod.SetInterceptors ] to provide global interceptors to the application.
188
188
func Example_interceptorGlobal () {
189
189
itcpt := interceptor .Interceptor (func (ctx context.Context , info interceptor.CallInfo , req , res []interface {}, next interceptor.HandleFunc ) error {
190
190
fmt .Println ("Before call" )
@@ -207,7 +207,7 @@ func Example_interceptorGlobal() {
207
207
// helloWorld shutdown
208
208
}
209
209
210
- // This example demonstrates how to use [kod.WithInterceptors ] to provide component-specific interceptors to the application.
210
+ // This example demonstrates how to use [kod.Kod.SetInterceptors ] to provide component-specific interceptors to the application.
211
211
func Example_interceptorComponent () {
212
212
kod .Run (context .Background (), func (ctx context.Context , app * helloworld.App ) error {
213
213
app .HelloWorldInterceptor .Get ().SayHello (ctx )
@@ -221,7 +221,7 @@ func Example_interceptorComponent() {
221
221
// helloWorld shutdown
222
222
}
223
223
224
- // This example demonstrates how to use built-in interceptors with [kod.WithInterceptors ].
224
+ // This example demonstrates how to use built-in interceptors with [kod.Kod.SetInterceptors ].
225
225
// Such as [krecovery.Interceptor], [ktrace.Interceptor], and [kmetric.Interceptor] ...
226
226
func Example_interceptorBuiltin () {
227
227
kod .Run (context .Background (), func (ctx context.Context , app * helloworld.App ) error {
0 commit comments