Files
dance-lessons-coach/pkg/greet/greet_v2.go
Gabriel Radureau 9336178d73 📝 docs: add ADR for staged-only Git hooks formatting
- 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>
2026-04-04 21:36:57 +02:00

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 + "!"
}