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