INNER CODE UNIT · Go

func

pace/bricks · tools/testserver/simplemath/main.go:35

func (*SimpleMathServer) Add(ctx context.Context, i *math.Input) (*math.Output, error) {
	if loc, ok := locale.FromCtx(ctx); ok {
		log.Ctx(ctx).Debug().Msgf("Locale: %q", loc.Serialize())
	}
	span := sentry.SpanFromContext(ctx)
	if span != nil {
		log.Ctx(ctx).Debug().Msgf("Span: %q", span.Name)
	}

	var o math.Output
	o.C = i.A + i.B
	log.Ctx(ctx).Debug().Msgf("A: %d + B: %d = C: %d", i.A, i.B, o.C)
	return &o, nil
}

func (*SimpleMathServer) Substract(ctx context.Context, i *math.Input) (*math.Output, error) {
	panic("not implemented")
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…