From 293053a1e0b33cee2bd6ed52420b74dc4fea638a Mon Sep 17 00:00:00 2001 From: Nicholas Molnar <65710+neekolas@users.noreply.github.com> Date: Tue, 24 Oct 2023 08:46:55 -0700 Subject: [PATCH] Change casing of validation options --- pkg/mlsvalidate/config.go | 4 ++-- pkg/mlsvalidate/service.go | 4 ++-- pkg/server/options.go | 2 +- pkg/server/server.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/mlsvalidate/config.go b/pkg/mlsvalidate/config.go index 895de47f..dd644eab 100644 --- a/pkg/mlsvalidate/config.go +++ b/pkg/mlsvalidate/config.go @@ -1,5 +1,5 @@ package mlsvalidate -type MlsValidationOptions struct { - GrpcAddress string `long:"grpc-address" description:"Address for the GRPC validation service"` +type MLSValidationOptions struct { + GRPCAddress string `long:"grpc-address" description:"Address for the GRPC validation service"` } diff --git a/pkg/mlsvalidate/service.go b/pkg/mlsvalidate/service.go index 375429b4..36756ee2 100644 --- a/pkg/mlsvalidate/service.go +++ b/pkg/mlsvalidate/service.go @@ -32,8 +32,8 @@ type MLSValidationServiceImpl struct { grpcClient svc.ValidationApiClient } -func NewMlsValidationService(ctx context.Context, options MlsValidationOptions) (*MLSValidationServiceImpl, error) { - conn, err := grpc.DialContext(ctx, options.GrpcAddress, grpc.WithTransportCredentials(insecure.NewCredentials())) +func NewMlsValidationService(ctx context.Context, options MLSValidationOptions) (*MLSValidationServiceImpl, error) { + conn, err := grpc.DialContext(ctx, options.GRPCAddress, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { return nil, err } diff --git a/pkg/server/options.go b/pkg/server/options.go index 69096d9c..e21e3efb 100644 --- a/pkg/server/options.go +++ b/pkg/server/options.go @@ -77,5 +77,5 @@ type Options struct { Tracing TracingOptions `group:"DD APM Tracing Options"` Profiling ProfilingOptions `group:"DD APM Profiling Options" namespace:"profiling"` MLSStore mlsstore.StoreOptions `group:"MLS Options" namespace:"mls-store"` - MlsValidation mlsvalidate.MlsValidationOptions `group:"MLS Validation Options" namespace:"mls-validation"` + MlsValidation mlsvalidate.MLSValidationOptions `group:"MLS Validation Options" namespace:"mls-validation"` } diff --git a/pkg/server/server.go b/pkg/server/server.go index f720e04d..8887fb82 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -248,7 +248,7 @@ func New(ctx context.Context, log *zap.Logger, options Options) (*Server, error) } var MLSValidator mlsvalidate.MLSValidationService - if options.MlsValidation.GrpcAddress != "" { + if options.MlsValidation.GRPCAddress != "" { MLSValidator, err = mlsvalidate.NewMlsValidationService(ctx, options.MlsValidation) if err != nil { return nil, errors.Wrap(err, "creating mls validation service")