- Add ADR-0012 documenting the decision to format only staged Go files - Update ADR README.md with new entry - Document rationale, alternatives, and verification results - Include future considerations for monitoring and CI/CD integration Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
25 lines
561 B
Go
25 lines
561 B
Go
package greet
|
|
|
|
import (
|
|
"context"
|
|
"github.com/rs/zerolog/log"
|
|
)
|
|
|
|
type ServiceV2 struct{}
|
|
|
|
func NewServiceV2() *ServiceV2 {
|
|
return &ServiceV2{}
|
|
}
|
|
|
|
// GreetV2 returns a v2 greeting message for the given name.
|
|
// If name is empty, it defaults to "friend".
|
|
// This is the v2 implementation that returns "Hello my friend <name>!"
|
|
func (s *ServiceV2) GreetV2(ctx context.Context, name string) string {
|
|
log.Trace().Ctx(ctx).Str("name", name).Msg("GreetV2 function called")
|
|
|
|
if name == "" {
|
|
return "Hello my friend!"
|
|
}
|
|
return "Hello my friend " + name + "!"
|
|
}
|