Files
dance-lessons-coach/pkg/greet/greet_v2.go
Gabriel Radureau 183933b43e
Some checks failed
Go CI/CD Pipeline / Lint and Format (push) Successful in 4m51s
Docker Build and Publish / Version Bump (push) Successful in 4m54s
Docker Build and Publish / Build and Push Docker Image (push) Failing after 2m51s
Go CI/CD Pipeline / Build and Test (push) Successful in 9m47s
Go CI/CD Pipeline / Version Management (push) Successful in 12s
feat: integrate swag fmt and improve CI/CD workflows
- Add swag fmt to git pre-commit hook and CI/CD pipeline
- Create comprehensive CONTRIBUTING.md guide with AI section
- Update ADR-0013 with swag fmt documentation
- Fix swagger generation to include all endpoints
- Improve local testing scripts and workflows
- Update Dockerfile for better swagger handling
- Fix CI/CD workflow file references
2026-04-06 15:36:55 +02:00

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