func (b *Builder) WithAnnotations(annotations map[string]string) *Builder {
	if len(annotations) == 0 {
		b.errs = append(
			b.errs,
			errors.New("failed to build service object: missing annotations"),
		)
		return b
	}
	if b.service.object.Annotations == nil {
		return b.WithAnnotationsNew(annotations)
	}
	for key, value := range annotations {
		b.service.object.Annotations[key] = value
	}
	return b
}
WithAnnotations merges existing annotations if any
with the ones that are provided here
package service
import (
	errors "github.com/pkg/errors"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type Builder struct {
	service *Service
	errs    []error
}
func NewBuilder() *Builder {
	return &Builder{service: &Service{object: &corev1.Service{}}}
}
func (b *Builder) WithName(name string) *Builder {
	if len(name) == 0 {
		b.errs = append(
			b.errs,
			errors.
				New("failed to build service object: missing name"),
		)
		return b
	}
	b.service.object.Name = name
	return b
}
func (b *Builder) WithGenerateName(name string) *Builder {
	if len(name) == 0 {
		b.errs = append(
			b.errs,
			errors.
				New("failed to build service object: missing generateName"),
		)
		return b
	}
	b.service.object.GenerateName = name
	return b
}
func (b *Builder) WithNamespace(namespace string) *Builder {
	if len(namespace) == 0 {
		b.errs = append(
			b.errs,
			errors.
				New("failed to build service object: missing namespace"),
		)
		return b
	}
	b.service.object.Namespace = namespace
	return b
}