From 2b9590b1460e3d6200d5ee28b9d5750e702c3bfc Mon Sep 17 00:00:00 2001
From: Neil-Jocelyn Schark <neil.schark@h-da.de>
Date: Tue, 23 Jan 2024 14:14:35 +0000
Subject: [PATCH] lint-fix

---
 ekms/api/go/rest/etsi/server/go/api.go        |  7 ++----
 .../api/go/rest/etsi/server/go/api_default.go | 18 ++++++-------
 .../etsi/server/go/api_default_service.go     | 14 +++++------
 ekms/api/go/rest/etsi/server/go/error.go      |  8 +++---
 ekms/api/go/rest/etsi/server/go/helpers.go    |  4 +--
 ekms/api/go/rest/etsi/server/go/impl.go       |  2 +-
 .../rest/etsi/server/go/model_error_format.go |  8 ++----
 .../etsi/server/go/model_key_container.go     |  8 ++----
 .../go/model_key_container_keys_inner.go      |  8 ++----
 .../etsi/server/go/model_key_ids_request.go   |  8 ++----
 .../go/model_key_ids_request_key_ids_inner.go |  8 ++----
 .../rest/etsi/server/go/model_key_request.go  |  8 ++----
 .../go/rest/etsi/server/go/model_status.go    |  8 ++----
 ekms/api/go/rest/etsi/server/go/routers.go    | 25 ++++++++++---------
 ekms/cmd/root.go                              |  2 +-
 ekms/cmd/start.go                             |  6 ++---
 ekms/etsiqkdnclient/etsi-qkdn-client.go       | 10 +++++---
 ekms/internal/kms/event/bus.go                |  4 +--
 ekms/internal/kms/kms-keystore.go             |  4 +--
 ekms/internal/kms/kms.go                      |  6 ++---
 ekms/internal/kms/kmsetsi.go                  |  4 +--
 ekms/internal/kms/kmsintercom.go              |  4 +--
 ekms/internal/kms/kmspeers.go                 |  2 +-
 ekms/internal/kms/module.go                   |  2 +-
 ekms/internal/kms/util.go                     |  2 +-
 ekms/osclient/additions/system_linux.go       |  4 +--
 ekms/osclient/additions/system_linux_test.go  |  1 -
 ekms/osclient/client.go                       |  2 +-
 ekms/restserver/restserver.go                 | 10 ++++----
 quantumlayer/quantumlayer-emu-prng.go         | 11 ++++----
 quantumlayer/quantumlayer-emu-prng_test.go    |  2 --
 31 files changed, 88 insertions(+), 122 deletions(-)

diff --git a/ekms/api/go/rest/etsi/server/go/api.go b/ekms/api/go/rest/etsi/server/go/api.go
index c75b26b5..b7ba63cf 100644
--- a/ekms/api/go/rest/etsi/server/go/api.go
+++ b/ekms/api/go/rest/etsi/server/go/api.go
@@ -14,12 +14,10 @@ import (
 	"net/http"
 )
 
-
-
 // DefaultAPIRouter defines the required methods for binding the api requests to a responses for the DefaultAPI
 // The DefaultAPIRouter implementation should parse necessary information from the http request,
 // pass the data to a DefaultAPIServicer to perform the required actions, then write the service results to the http response.
-type DefaultAPIRouter interface { 
+type DefaultAPIRouter interface {
 	GetKey(http.ResponseWriter, *http.Request)
 	GetKeyPost(http.ResponseWriter, *http.Request)
 	GetKeyWithIds(http.ResponseWriter, *http.Request)
@@ -27,12 +25,11 @@ type DefaultAPIRouter interface {
 	GetStatus(http.ResponseWriter, *http.Request)
 }
 
-
 // DefaultAPIServicer defines the api actions for the DefaultAPI service
 // This interface intended to stay up to date with the openapi yaml used to generate it,
 // while the service implementation can be ignored with the .openapi-generator-ignore file
 // and updated with the logic required for the API.
-type DefaultAPIServicer interface { 
+type DefaultAPIServicer interface {
 	GetKey(context.Context, interface{}, int64, int64) (ImplResponse, error)
 	GetKeyPost(context.Context, interface{}, KeyRequest) (ImplResponse, error)
 	GetKeyWithIds(context.Context, interface{}, string) (ImplResponse, error)
diff --git a/ekms/api/go/rest/etsi/server/go/api_default.go b/ekms/api/go/rest/etsi/server/go/api_default.go
index ffa0da4d..3c0c9489 100644
--- a/ekms/api/go/rest/etsi/server/go/api_default.go
+++ b/ekms/api/go/rest/etsi/server/go/api_default.go
@@ -19,7 +19,7 @@ import (
 	"github.com/gorilla/mux"
 )
 
-// DefaultAPIController binds http requests to an api service and writes the service results to the http response
+// DefaultAPIController binds http requests to an api service and writes the service results to the http response.
 type DefaultAPIController struct {
 	service      DefaultAPIServicer
 	errorHandler ErrorHandler
@@ -28,14 +28,14 @@ type DefaultAPIController struct {
 // DefaultAPIOption for how the controller is set up.
 type DefaultAPIOption func(*DefaultAPIController)
 
-// WithDefaultAPIErrorHandler inject ErrorHandler into controller
+// WithDefaultAPIErrorHandler inject ErrorHandler into controller.
 func WithDefaultAPIErrorHandler(h ErrorHandler) DefaultAPIOption {
 	return func(c *DefaultAPIController) {
 		c.errorHandler = h
 	}
 }
 
-// NewDefaultAPIController creates a default api controller
+// NewDefaultAPIController creates a default api controller.
 func NewDefaultAPIController(s DefaultAPIServicer, opts ...DefaultAPIOption) Router {
 	controller := &DefaultAPIController{
 		service:      s,
@@ -49,7 +49,7 @@ func NewDefaultAPIController(s DefaultAPIServicer, opts ...DefaultAPIOption) Rou
 	return controller
 }
 
-// Routes returns all the api routes for the DefaultAPIController
+// Routes returns all the api routes for the DefaultAPIController.
 func (c *DefaultAPIController) Routes() Routes {
 	return Routes{
 		"GetKey": Route{
@@ -80,7 +80,7 @@ func (c *DefaultAPIController) Routes() Routes {
 	}
 }
 
-// GetKey - TBD
+// GetKey - TBD.
 func (c *DefaultAPIController) GetKey(w http.ResponseWriter, r *http.Request) {
 	params := mux.Vars(r)
 	query := r.URL.Query()
@@ -111,7 +111,7 @@ func (c *DefaultAPIController) GetKey(w http.ResponseWriter, r *http.Request) {
 	EncodeJSONResponse(result.Body, &result.Code, w)
 }
 
-// GetKeyPost -
+// GetKeyPost -.
 func (c *DefaultAPIController) GetKeyPost(w http.ResponseWriter, r *http.Request) {
 	params := mux.Vars(r)
 	slaveSAEIDParam := params["slave_SAE_ID"]
@@ -140,7 +140,7 @@ func (c *DefaultAPIController) GetKeyPost(w http.ResponseWriter, r *http.Request
 	EncodeJSONResponse(result.Body, &result.Code, w)
 }
 
-// GetKeyWithIds - TBD
+// GetKeyWithIds - TBD.
 func (c *DefaultAPIController) GetKeyWithIds(w http.ResponseWriter, r *http.Request) {
 	params := mux.Vars(r)
 	query := r.URL.Query()
@@ -156,7 +156,7 @@ func (c *DefaultAPIController) GetKeyWithIds(w http.ResponseWriter, r *http.Requ
 	EncodeJSONResponse(result.Body, &result.Code, w)
 }
 
-// GetKeyWithIdsPost - TBD
+// GetKeyWithIdsPost - TBD.
 func (c *DefaultAPIController) GetKeyWithIdsPost(w http.ResponseWriter, r *http.Request) {
 	params := mux.Vars(r)
 	masterSAEIDParam := params["master_SAE_ID"]
@@ -185,7 +185,7 @@ func (c *DefaultAPIController) GetKeyWithIdsPost(w http.ResponseWriter, r *http.
 	EncodeJSONResponse(result.Body, &result.Code, w)
 }
 
-// GetStatus - TBD
+// GetStatus - TBD.
 func (c *DefaultAPIController) GetStatus(w http.ResponseWriter, r *http.Request) {
 	params := mux.Vars(r)
 	slaveSAEIDParam := params["slave_SAE_ID"]
diff --git a/ekms/api/go/rest/etsi/server/go/api_default_service.go b/ekms/api/go/rest/etsi/server/go/api_default_service.go
index 90a01d27..a0c51ca7 100644
--- a/ekms/api/go/rest/etsi/server/go/api_default_service.go
+++ b/ekms/api/go/rest/etsi/server/go/api_default_service.go
@@ -11,8 +11,8 @@ package etsi14
 
 import (
 	"context"
-	"net/http"
 	"errors"
+	"net/http"
 )
 
 // DefaultAPIService is a service that implements the logic for the DefaultAPIServicer
@@ -21,12 +21,12 @@ import (
 type DefaultAPIService struct {
 }
 
-// NewDefaultAPIService creates a default api service
+// NewDefaultAPIService creates a default api service.
 func NewDefaultAPIService() DefaultAPIServicer {
 	return &DefaultAPIService{}
 }
 
-// GetKey - TBD
+// GetKey - TBD.
 func (s *DefaultAPIService) GetKey(ctx context.Context, slaveSAEID interface{}, number int64, size int64) (ImplResponse, error) {
 	// TODO - update GetKey with the required logic for this service method.
 	// Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -46,7 +46,7 @@ func (s *DefaultAPIService) GetKey(ctx context.Context, slaveSAEID interface{},
 	return Response(http.StatusNotImplemented, nil), errors.New("GetKey method not implemented")
 }
 
-// GetKeyPost - 
+// GetKeyPost -. 
 func (s *DefaultAPIService) GetKeyPost(ctx context.Context, slaveSAEID interface{}, keyRequest KeyRequest) (ImplResponse, error) {
 	// TODO - update GetKeyPost with the required logic for this service method.
 	// Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -66,7 +66,7 @@ func (s *DefaultAPIService) GetKeyPost(ctx context.Context, slaveSAEID interface
 	return Response(http.StatusNotImplemented, nil), errors.New("GetKeyPost method not implemented")
 }
 
-// GetKeyWithIds - TBD
+// GetKeyWithIds - TBD.
 func (s *DefaultAPIService) GetKeyWithIds(ctx context.Context, masterSAEID interface{}, keyID string) (ImplResponse, error) {
 	// TODO - update GetKeyWithIds with the required logic for this service method.
 	// Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -86,7 +86,7 @@ func (s *DefaultAPIService) GetKeyWithIds(ctx context.Context, masterSAEID inter
 	return Response(http.StatusNotImplemented, nil), errors.New("GetKeyWithIds method not implemented")
 }
 
-// GetKeyWithIdsPost - TBD
+// GetKeyWithIdsPost - TBD.
 func (s *DefaultAPIService) GetKeyWithIdsPost(ctx context.Context, masterSAEID interface{}, keyIdsRequest KeyIdsRequest) (ImplResponse, error) {
 	// TODO - update GetKeyWithIdsPost with the required logic for this service method.
 	// Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -106,7 +106,7 @@ func (s *DefaultAPIService) GetKeyWithIdsPost(ctx context.Context, masterSAEID i
 	return Response(http.StatusNotImplemented, nil), errors.New("GetKeyWithIdsPost method not implemented")
 }
 
-// GetStatus - TBD
+// GetStatus - TBD.
 func (s *DefaultAPIService) GetStatus(ctx context.Context, slaveSAEID interface{}) (ImplResponse, error) {
 	// TODO - update GetStatus with the required logic for this service method.
 	// Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
diff --git a/ekms/api/go/rest/etsi/server/go/error.go b/ekms/api/go/rest/etsi/server/go/error.go
index 01347b65..9bc45a0d 100644
--- a/ekms/api/go/rest/etsi/server/go/error.go
+++ b/ekms/api/go/rest/etsi/server/go/error.go
@@ -16,11 +16,11 @@ import (
 )
 
 var (
-	// ErrTypeAssertionError is thrown when type an interface does not match the asserted type
+	// ErrTypeAssertionError is thrown when type an interface does not match the asserted type.
 	ErrTypeAssertionError = errors.New("unable to assert type")
 )
 
-// ParsingError indicates that an error has occurred when parsing request parameters
+// ParsingError indicates that an error has occurred when parsing request parameters.
 type ParsingError struct {
 	Err error
 }
@@ -33,7 +33,7 @@ func (e *ParsingError) Error() string {
 	return e.Err.Error()
 }
 
-// RequiredError indicates that an error has occurred when parsing request parameters
+// RequiredError indicates that an error has occurred when parsing request parameters.
 type RequiredError struct {
 	Field string
 }
@@ -43,7 +43,7 @@ func (e *RequiredError) Error() string {
 }
 
 // ErrorHandler defines the required method for handling error. You may implement it and inject this into a controller if
-// you would like errors to be handled differently from the DefaultErrorHandler
+// you would like errors to be handled differently from the DefaultErrorHandler.
 type ErrorHandler func(w http.ResponseWriter, r *http.Request, err error, result *ImplResponse)
 
 // DefaultErrorHandler defines the default logic on how to handle errors from the controller. Any errors from parsing
diff --git a/ekms/api/go/rest/etsi/server/go/helpers.go b/ekms/api/go/rest/etsi/server/go/helpers.go
index 36316ddd..217cccbb 100644
--- a/ekms/api/go/rest/etsi/server/go/helpers.go
+++ b/ekms/api/go/rest/etsi/server/go/helpers.go
@@ -13,9 +13,9 @@ import (
 	"reflect"
 )
 
-// Response return a ImplResponse struct filled
+// Response return a ImplResponse struct filled.
 func Response(code int, body interface{}) ImplResponse {
-	return ImplResponse {
+	return ImplResponse{
 		Code: code,
 		Body: body,
 	}
diff --git a/ekms/api/go/rest/etsi/server/go/impl.go b/ekms/api/go/rest/etsi/server/go/impl.go
index 3d098aa7..0c47d7d8 100644
--- a/ekms/api/go/rest/etsi/server/go/impl.go
+++ b/ekms/api/go/rest/etsi/server/go/impl.go
@@ -9,7 +9,7 @@
 
 package etsi14
 
-// ImplResponse defines an implementation response with error code and the associated body
+// ImplResponse defines an implementation response with error code and the associated body.
 type ImplResponse struct {
 	Code int
 	Body interface{}
diff --git a/ekms/api/go/rest/etsi/server/go/model_error_format.go b/ekms/api/go/rest/etsi/server/go/model_error_format.go
index 875b9b4f..7a675f17 100644
--- a/ekms/api/go/rest/etsi/server/go/model_error_format.go
+++ b/ekms/api/go/rest/etsi/server/go/model_error_format.go
@@ -9,22 +9,18 @@
 
 package etsi14
 
-
-
-
 type ErrorFormat struct {
-
 	Message string `json:"message,omitempty"`
 
 	Details []map[string]string `json:"details,omitempty"`
 }
 
-// AssertErrorFormatRequired checks if the required fields are not zero-ed
+// AssertErrorFormatRequired checks if the required fields are not zero-ed.
 func AssertErrorFormatRequired(obj ErrorFormat) error {
 	return nil
 }
 
-// AssertErrorFormatConstraints checks if the values respects the defined constraints
+// AssertErrorFormatConstraints checks if the values respects the defined constraints.
 func AssertErrorFormatConstraints(obj ErrorFormat) error {
 	return nil
 }
diff --git a/ekms/api/go/rest/etsi/server/go/model_key_container.go b/ekms/api/go/rest/etsi/server/go/model_key_container.go
index ec5244a1..609f2a50 100644
--- a/ekms/api/go/rest/etsi/server/go/model_key_container.go
+++ b/ekms/api/go/rest/etsi/server/go/model_key_container.go
@@ -9,15 +9,11 @@
 
 package etsi14
 
-
-
-
 type KeyContainer struct {
-
 	Keys []KeyContainerKeysInner `json:"Keys,omitempty"`
 }
 
-// AssertKeyContainerRequired checks if the required fields are not zero-ed
+// AssertKeyContainerRequired checks if the required fields are not zero-ed.
 func AssertKeyContainerRequired(obj KeyContainer) error {
 	for _, el := range obj.Keys {
 		if err := AssertKeyContainerKeysInnerRequired(el); err != nil {
@@ -27,7 +23,7 @@ func AssertKeyContainerRequired(obj KeyContainer) error {
 	return nil
 }
 
-// AssertKeyContainerConstraints checks if the values respects the defined constraints
+// AssertKeyContainerConstraints checks if the values respects the defined constraints.
 func AssertKeyContainerConstraints(obj KeyContainer) error {
 	return nil
 }
diff --git a/ekms/api/go/rest/etsi/server/go/model_key_container_keys_inner.go b/ekms/api/go/rest/etsi/server/go/model_key_container_keys_inner.go
index 41269aa7..3a62cde0 100644
--- a/ekms/api/go/rest/etsi/server/go/model_key_container_keys_inner.go
+++ b/ekms/api/go/rest/etsi/server/go/model_key_container_keys_inner.go
@@ -9,22 +9,18 @@
 
 package etsi14
 
-
-
-
 type KeyContainerKeysInner struct {
-
 	KeyID string `json:"key_ID,omitempty"`
 
 	Key string `json:"key,omitempty"`
 }
 
-// AssertKeyContainerKeysInnerRequired checks if the required fields are not zero-ed
+// AssertKeyContainerKeysInnerRequired checks if the required fields are not zero-ed.
 func AssertKeyContainerKeysInnerRequired(obj KeyContainerKeysInner) error {
 	return nil
 }
 
-// AssertKeyContainerKeysInnerConstraints checks if the values respects the defined constraints
+// AssertKeyContainerKeysInnerConstraints checks if the values respects the defined constraints.
 func AssertKeyContainerKeysInnerConstraints(obj KeyContainerKeysInner) error {
 	return nil
 }
diff --git a/ekms/api/go/rest/etsi/server/go/model_key_ids_request.go b/ekms/api/go/rest/etsi/server/go/model_key_ids_request.go
index 20f94d23..60bbe556 100644
--- a/ekms/api/go/rest/etsi/server/go/model_key_ids_request.go
+++ b/ekms/api/go/rest/etsi/server/go/model_key_ids_request.go
@@ -9,15 +9,11 @@
 
 package etsi14
 
-
-
-
 type KeyIdsRequest struct {
-
 	KeyIDs []KeyIdsRequestKeyIdsInner `json:"key_IDs,omitempty"`
 }
 
-// AssertKeyIdsRequestRequired checks if the required fields are not zero-ed
+// AssertKeyIdsRequestRequired checks if the required fields are not zero-ed.
 func AssertKeyIdsRequestRequired(obj KeyIdsRequest) error {
 	for _, el := range obj.KeyIDs {
 		if err := AssertKeyIdsRequestKeyIdsInnerRequired(el); err != nil {
@@ -27,7 +23,7 @@ func AssertKeyIdsRequestRequired(obj KeyIdsRequest) error {
 	return nil
 }
 
-// AssertKeyIdsRequestConstraints checks if the values respects the defined constraints
+// AssertKeyIdsRequestConstraints checks if the values respects the defined constraints.
 func AssertKeyIdsRequestConstraints(obj KeyIdsRequest) error {
 	return nil
 }
diff --git a/ekms/api/go/rest/etsi/server/go/model_key_ids_request_key_ids_inner.go b/ekms/api/go/rest/etsi/server/go/model_key_ids_request_key_ids_inner.go
index 4b2ab370..48f6a25e 100644
--- a/ekms/api/go/rest/etsi/server/go/model_key_ids_request_key_ids_inner.go
+++ b/ekms/api/go/rest/etsi/server/go/model_key_ids_request_key_ids_inner.go
@@ -9,15 +9,11 @@
 
 package etsi14
 
-
-
-
 type KeyIdsRequestKeyIdsInner struct {
-
 	KeyID string `json:"key_ID"`
 }
 
-// AssertKeyIdsRequestKeyIdsInnerRequired checks if the required fields are not zero-ed
+// AssertKeyIdsRequestKeyIdsInnerRequired checks if the required fields are not zero-ed.
 func AssertKeyIdsRequestKeyIdsInnerRequired(obj KeyIdsRequestKeyIdsInner) error {
 	elements := map[string]interface{}{
 		"key_ID": obj.KeyID,
@@ -31,7 +27,7 @@ func AssertKeyIdsRequestKeyIdsInnerRequired(obj KeyIdsRequestKeyIdsInner) error
 	return nil
 }
 
-// AssertKeyIdsRequestKeyIdsInnerConstraints checks if the values respects the defined constraints
+// AssertKeyIdsRequestKeyIdsInnerConstraints checks if the values respects the defined constraints.
 func AssertKeyIdsRequestKeyIdsInnerConstraints(obj KeyIdsRequestKeyIdsInner) error {
 	return nil
 }
diff --git a/ekms/api/go/rest/etsi/server/go/model_key_request.go b/ekms/api/go/rest/etsi/server/go/model_key_request.go
index b6d4d075..6a4c685c 100644
--- a/ekms/api/go/rest/etsi/server/go/model_key_request.go
+++ b/ekms/api/go/rest/etsi/server/go/model_key_request.go
@@ -9,11 +9,7 @@
 
 package etsi14
 
-
-
-
 type KeyRequest struct {
-
 	Number int64 `json:"number,omitempty"`
 
 	Size int64 `json:"size,omitempty"`
@@ -25,12 +21,12 @@ type KeyRequest struct {
 	ExtensionOptional []map[string]string `json:"extension_optional,omitempty"`
 }
 
-// AssertKeyRequestRequired checks if the required fields are not zero-ed
+// AssertKeyRequestRequired checks if the required fields are not zero-ed.
 func AssertKeyRequestRequired(obj KeyRequest) error {
 	return nil
 }
 
-// AssertKeyRequestConstraints checks if the values respects the defined constraints
+// AssertKeyRequestConstraints checks if the values respects the defined constraints.
 func AssertKeyRequestConstraints(obj KeyRequest) error {
 	return nil
 }
diff --git a/ekms/api/go/rest/etsi/server/go/model_status.go b/ekms/api/go/rest/etsi/server/go/model_status.go
index a0c25dec..496e1831 100644
--- a/ekms/api/go/rest/etsi/server/go/model_status.go
+++ b/ekms/api/go/rest/etsi/server/go/model_status.go
@@ -9,11 +9,7 @@
 
 package etsi14
 
-
-
-
 type Status struct {
-
 	SourceKMEID string `json:"source_KME_ID,omitempty"`
 
 	TargetKMEID string `json:"target_KME_ID,omitempty"`
@@ -37,12 +33,12 @@ type Status struct {
 	MaxSAEIDCount int64 `json:"max_SAE_ID_count,omitempty"`
 }
 
-// AssertStatusRequired checks if the required fields are not zero-ed
+// AssertStatusRequired checks if the required fields are not zero-ed.
 func AssertStatusRequired(obj Status) error {
 	return nil
 }
 
-// AssertStatusConstraints checks if the values respects the defined constraints
+// AssertStatusConstraints checks if the values respects the defined constraints.
 func AssertStatusConstraints(obj Status) error {
 	return nil
 }
diff --git a/ekms/api/go/rest/etsi/server/go/routers.go b/ekms/api/go/rest/etsi/server/go/routers.go
index acc4360e..82512439 100644
--- a/ekms/api/go/rest/etsi/server/go/routers.go
+++ b/ekms/api/go/rest/etsi/server/go/routers.go
@@ -12,26 +12,27 @@ package etsi14
 import (
 	"encoding/json"
 	"errors"
-	"github.com/gorilla/mux"
 	"io/ioutil"
 	"mime/multipart"
 	"net/http"
 	"os"
 	"strconv"
 	"strings"
+
+	"github.com/gorilla/mux"
 )
 
-// A Route defines the parameters for an api endpoint
+// A Route defines the parameters for an api endpoint.
 type Route struct {
-	Method	  string
-	Pattern	 string
+	Method      string
+	Pattern     string
 	HandlerFunc http.HandlerFunc
 }
 
-// Routes is a map of defined api endpoints
+// Routes is a map of defined api endpoints.
 type Routes map[string]Route
 
-// Router defines the required methods for retrieving api routes
+// Router defines the required methods for retrieving api routes.
 type Router interface {
 	Routes() Routes
 }
@@ -40,7 +41,7 @@ const errMsgRequiredMissing = "required parameter is missing"
 const errMsgMinValueConstraint = "provided parameter is not respecting minimum value constraint"
 const errMsgMaxValueConstraint = "provided parameter is not respecting maximum value constraint"
 
-// NewRouter creates a new router for any number of api routers
+// NewRouter creates a new router for any number of api routers.
 func NewRouter(routers ...Router) *mux.Router {
 	router := mux.NewRouter().StrictSlash(true)
 	for _, api := range routers {
@@ -60,7 +61,7 @@ func NewRouter(routers ...Router) *mux.Router {
 	return router
 }
 
-// EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code
+// EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code.
 func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error {
 	w.Header().Set("Content-Type", "application/json; charset=UTF-8")
 	if status != nil {
@@ -76,7 +77,7 @@ func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error
 	return nil
 }
 
-// ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file
+// ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file.
 func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) {
 	_, fileHeader, err := r.FormFile(key)
 	if err != nil {
@@ -86,7 +87,7 @@ func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) {
 	return readFileHeaderToTempFile(fileHeader)
 }
 
-// ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files
+// ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files.
 func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) {
 	if err := r.ParseMultipartForm(32 << 20); err != nil {
 		return nil, err
@@ -106,7 +107,7 @@ func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) {
 	return files, nil
 }
 
-// readFileHeaderToTempFile reads multipart.FileHeader and writes it to a temporary file
+// readFileHeaderToTempFile reads multipart.FileHeader and writes it to a temporary file.
 func readFileHeaderToTempFile(fileHeader *multipart.FileHeader) (*os.File, error) {
 	formFile, err := fileHeader.Open()
 	if err != nil {
@@ -257,7 +258,7 @@ func parseNumericParameter[T Number](param string, fn Operation[T], checks ...Co
 	return v, nil
 }
 
-// parseBoolParameter parses a string parameter to a bool
+// parseBoolParameter parses a string parameter to a bool.
 func parseBoolParameter(param string, fn Operation[bool]) (bool, error) {
 	v, _, err := fn(param)
 	return v, err
diff --git a/ekms/cmd/root.go b/ekms/cmd/root.go
index c701b72a..8220fa95 100644
--- a/ekms/cmd/root.go
+++ b/ekms/cmd/root.go
@@ -34,7 +34,7 @@ import (
 	"github.com/spf13/cobra"
 )
 
-// rootCmd represents the base command when called without any subcommands
+// rootCmd represents the base command when called without any subcommands.
 var rootCmd = &cobra.Command{
 	Use:   "ekms",
 	Short: "A brief description of your application",
diff --git a/ekms/cmd/start.go b/ekms/cmd/start.go
index b2c37412..622dc81b 100644
--- a/ekms/cmd/start.go
+++ b/ekms/cmd/start.go
@@ -56,16 +56,16 @@ var (
 	caFile      string // the location of the file containing the ca certificate to verify client certificates
 	keyFile     string // the location of the file containing the key for the certificates for the gnmi server
 	insecure    *bool  // set to true if insecure operations is needed, i.e., do not use TLS
-	// Below is qkdn specific information
+	// Below is qkdn specific information.
 	udpQL1AddrString string
 	ql1Name          string
 	udpQL2AddrString string
 	ql2Name          string
 	kmsConfig        string
-	// End of qkdn specific information
+	// End of qkdn specific information.
 )
 
-// startCmd represents the start command
+// startCmd represents the start command.
 var startCmd = &cobra.Command{
 	Use:   "start",
 	Short: "Start gnmi server",
diff --git a/ekms/etsiqkdnclient/etsi-qkdn-client.go b/ekms/etsiqkdnclient/etsi-qkdn-client.go
index fd0179d4..177efe2b 100644
--- a/ekms/etsiqkdnclient/etsi-qkdn-client.go
+++ b/ekms/etsiqkdnclient/etsi-qkdn-client.go
@@ -70,7 +70,7 @@ type EkmsClient interface {
 }
 
 // TODO: change this in the future
-// This provides some static information
+// This provides some static information.
 type ekmsInfo struct {
 	// Information used to fill the ETSI GS QKD 15 yang model
 	id                   uuid.UUID
@@ -97,7 +97,7 @@ func (evi *ekmsVersionInformation) HardwareVersion() string {
 	return evi.hwVersion
 }
 
-// A QkdnClient for the emulated KMS
+// A QkdnClient for the emulated KMS.
 func NewEkmsClient(bootInfo *Config) (myInfo *ekmsInfo) {
 	var ekmsId uuid.UUID
 	if bootInfo.Id != "" {
@@ -122,7 +122,7 @@ func NewEkmsClient(bootInfo *Config) (myInfo *ekmsInfo) {
 	return myInfo
 }
 
-// TODO: return an error
+// TODO: return an error.
 func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKMS {
 	// Attach to eKMS
 	emuKMS := kms.NewEKMS(config.Name, id, os.Stdout, log.TraceLevel, false, config.InterComAddr)
@@ -137,6 +137,8 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM
 		case "etsi":
 			qm, err = kms.NewETSI014HTTPQuantumModule(pqm.Address, pqm.SlaveSAEID, pqm.MasterSAEID, pqm.MasterMode)
 			if err != nil {
+				log.Fatalf("Failed to create ETSI QKD module: %s", err)
+				return nil
 			}
 		default:
 			log.Fatalf("Unknown type: %s for quantum module", qmt)
@@ -145,7 +147,7 @@ func emulatedKMS(config *Config, id uuid.UUID, peerChannel chan string) *kms.EKM
 
 		err := emuKMS.AddQuantumElement(qm)
 		if err != nil {
-			log.Fatalf("Failed to add quantum element", err)
+			log.Fatalf("Failed to add quantum element: %s", err)
 			return nil
 		}
 
diff --git a/ekms/internal/kms/event/bus.go b/ekms/internal/kms/event/bus.go
index 562e4a1e..301b883b 100644
--- a/ekms/internal/kms/event/bus.go
+++ b/ekms/internal/kms/event/bus.go
@@ -18,7 +18,7 @@ func (b *EventBus) Subscribe(topic Topic) (<-chan Event, error) {
 	subs, ok := b.subscribers[topic]
 	if !ok {
 		initialSub := map[chan<- Event]struct{}{
-			newSubChan: struct{}{},
+			newSubChan: {},
 		}
 		b.subscribers[topic] = initialSub
 	} else if subs != nil {
@@ -35,7 +35,7 @@ func (b *EventBus) Publish(event Event) error {
 	if !ok {
 		return fmt.Errorf("There are no active subscribers for topic: %d", event.Topic())
 	}
-	for sub, _ := range subs {
+	for sub := range subs {
 		sub <- event
 	}
 	return nil
diff --git a/ekms/internal/kms/kms-keystore.go b/ekms/internal/kms/kms-keystore.go
index 466d1ea6..3541211e 100644
--- a/ekms/internal/kms/kms-keystore.go
+++ b/ekms/internal/kms/kms-keystore.go
@@ -17,7 +17,7 @@ const (
 	USED
 )
 
-// holds a single ready to bit key, length can be configured
+// holds a single ready to bit key, length can be configured.
 type kmsKSElement struct {
 	keyID  uuid.UUID
 	key    []byte // a key
@@ -44,7 +44,7 @@ func (ks *kmsKeyStore) addKey(keyId uuid.UUID, keyToadd []byte) {
 
 	// test for collisions
 	if _, notThere := ks.keyStore[keyId]; notThere {
-		log.Errorf("Whop: addKey collission of key id %s", keyId)
+		log.Errorf("Whop: addKey collisions of key id %s", keyId)
 		return
 	}
 
diff --git a/ekms/internal/kms/kms.go b/ekms/internal/kms/kms.go
index 6868480f..4aaa8041 100644
--- a/ekms/internal/kms/kms.go
+++ b/ekms/internal/kms/kms.go
@@ -1,4 +1,4 @@
-// This package kms implements a simplistic key managment system (kms) for
+// This package kms implements a simplistic key management system (kms) for
 // Quantum Key Distribution Networks (QKDN) which is a simple emulated KMS. x
 // It relies on the emulated quantum link out of the quantumlayer package
 
@@ -36,7 +36,7 @@ const (
 	BitKeyLen512 BitKeyLength = "512"
 )
 
-// The general emulated KMS
+// The general emulated KMS.
 type EKMS struct {
 	kmsName      string
 	kmsUUID      uuid.UUID
@@ -207,7 +207,7 @@ func (kms *EKMS) EventBus() *event.EventBus {
 	return kms.eventBus
 }
 
-// TODO/XXX error handling
+// TODO/XXX error handling.
 func (kms *EKMS) RemovePeer(kmsPeerSocket string) {
 	if _, there := kms.KmsPeers[kmsPeerSocket]; there {
 		// peer.quit <- true
diff --git a/ekms/internal/kms/kmsetsi.go b/ekms/internal/kms/kmsetsi.go
index 767d4a91..7962b5a8 100644
--- a/ekms/internal/kms/kmsetsi.go
+++ b/ekms/internal/kms/kmsetsi.go
@@ -20,7 +20,7 @@ import (
 
 var etsiPort = flag.Int("port", 50900, "The server port")
 
-// TODO: remove etsiServer
+// TODO: remove etsiServer.
 type etsiServer struct {
 	pb.UnimplementedKmsETSIServer
 	handlingEkms *EKMS
@@ -50,7 +50,7 @@ func (es *etsiServer) ETSIGetQuantumInterfaces(ctx context.Context, in *pb.ETSIK
 	}, nil
 }
 
-// TODO: reimplement
+// TODO: reimplement.
 func (es *etsiServer) ETSIAddKMSPeer(ctx context.Context, in *pb.ETSIKMSPeerRequest) (*pb.ETSIKMSPeerReply, error) {
 	// determine the kms structure to call
 	log.Debugf("AddKMSPeer called.")
diff --git a/ekms/internal/kms/kmsintercom.go b/ekms/internal/kms/kmsintercom.go
index a941444e..a9adcc47 100644
--- a/ekms/internal/kms/kmsintercom.go
+++ b/ekms/internal/kms/kmsintercom.go
@@ -22,7 +22,7 @@ type kmsTalkerServer struct {
 	eKMS              *EKMS
 }
 
-// This must somehow find out and agree to a specific key lenght
+// This must somehow find out and agree to a specific key lenght.
 func (s *kmsTalkerServer) InterComCapabilities(ctx context.Context, in *pb.InterComCapabilitiesRequest) (capReply *pb.InterComCapabilitiesReply, err error) {
 	log.Debugf("Received: %v", in.GetMyKmsName())
 
@@ -83,7 +83,7 @@ func (s *kmsTalkerServer) KeyIdNotification(ctx context.Context, in *pb.KeyIdNot
 }
 
 // TODO: should be removed as soon as the emulated quantum module has been
-// changed; is specific for emulated quantum module
+// changed; is specific for emulated quantum module.
 func (s *kmsTalkerServer) SyncQkdBulk(ctx context.Context, in *pb.SyncQkdBulkRequest) (*pb.SyncQkdBulkResponse, error) {
 	// NOTE: with "google.golang.org/grpc/peer" it would be possible to get the client ip directly
 
diff --git a/ekms/internal/kms/kmspeers.go b/ekms/internal/kms/kmspeers.go
index 70d8e347..7a4d9823 100644
--- a/ekms/internal/kms/kmspeers.go
+++ b/ekms/internal/kms/kmspeers.go
@@ -20,7 +20,7 @@ type KmsPeerStatus int16
 const (
 	KmsPeerUp      KmsPeerStatus = iota // peer was seen up lately
 	KmsPeerDown                         // peer not reachable anymore
-	KmsPeerPending                      // peer was added and has to be succesfully contacted once
+	KmsPeerPending                      // peer was added and has to be successfully contacted once
 	KmsPeerUnknown                      // not known, not initialized
 )
 
diff --git a/ekms/internal/kms/module.go b/ekms/internal/kms/module.go
index 4d5fa386..9477e663 100644
--- a/ekms/internal/kms/module.go
+++ b/ekms/internal/kms/module.go
@@ -161,7 +161,7 @@ func (eqe *EmulatedQuantumModule) SetPeer(peer *kmsPeer) {
 
 // Takes a bulk of keys and chops them in chopFactor keys each
 // Any remainder is discarded
-// If keyIds is empty, uuids are generated
+// If keyIds is empty, uuids are generated.
 func (eqe *EmulatedQuantumModule) KeyChopper(bulkKey *quantumlayer.QuantumLayerBulkKey, keyIds []string) ([]string, map[uuid.UUID][]byte, error) {
 	if eqe.keyStore.keySingleSize == 0 {
 		return nil, nil, errors.New("KeyChopper: no  keySingleSize set")
diff --git a/ekms/internal/kms/util.go b/ekms/internal/kms/util.go
index 8a9949e6..11892269 100644
--- a/ekms/internal/kms/util.go
+++ b/ekms/internal/kms/util.go
@@ -58,7 +58,7 @@ func addETSIKeysToKeystore(keyStore *kmsKeyStore, keyContainer []etsi14.KeyConta
 	return nil
 }
 
-// NOTE: For demo purpose only
+// NOTE: For demo purpose only.
 func sendKmsInfoMessage(url string, json []byte) error {
 	request, err := http.NewRequest("POST", url, bytes.NewBuffer(json))
 	if err != nil {
diff --git a/ekms/osclient/additions/system_linux.go b/ekms/osclient/additions/system_linux.go
index 5d348023..b2ddd6c9 100644
--- a/ekms/osclient/additions/system_linux.go
+++ b/ekms/osclient/additions/system_linux.go
@@ -15,7 +15,7 @@ type system struct {
 	pfs procfs.FS
 }
 
-// NewSystem() Initalizes OS specific interfaces
+// NewSystem() Initializes OS specific interfaces
 // Linux:
 //   - Access to procfs
 func NewSystem() (System, error) {
@@ -46,7 +46,6 @@ func (sys *system) GetFreeMemory() uint64 {
 }
 
 func (sys *system) GetTotalMemory() uint64 {
-
 	memInfo, err := sys.pfs.Meminfo()
 	if err != nil {
 		// TODO: better error handling is required
@@ -69,7 +68,6 @@ func (sys *system) GetUsedMemory() uint64 {
 }
 
 func (sys *system) GetSoftwareVersion() (string, error) {
-
 	var returnString string
 	var osID string
 	var osVersion string
diff --git a/ekms/osclient/additions/system_linux_test.go b/ekms/osclient/additions/system_linux_test.go
index e6d1dc04..f5832317 100644
--- a/ekms/osclient/additions/system_linux_test.go
+++ b/ekms/osclient/additions/system_linux_test.go
@@ -6,7 +6,6 @@ import (
 )
 
 func TestSystemLinux(t *testing.T) {
-
 	// Retrieve new system for testin
 	sys, err := NewSystem()
 	if err != nil {
diff --git a/ekms/osclient/client.go b/ekms/osclient/client.go
index 6c235555..c37ec4ad 100644
--- a/ekms/osclient/client.go
+++ b/ekms/osclient/client.go
@@ -5,7 +5,7 @@ import (
 	"github.com/openconfig/ygot/ygot"
 )
 
-// Osclient describes
+// Osclient describes.
 type Osclient interface {
 	additions.System
 	UpdateConfig(config *ygot.ValidatedGoStruct) error
diff --git a/ekms/restserver/restserver.go b/ekms/restserver/restserver.go
index 2ba5a8d3..c9f12329 100644
--- a/ekms/restserver/restserver.go
+++ b/ekms/restserver/restserver.go
@@ -26,7 +26,7 @@ func SetupETSI14RestServer(etsi14RESTService *ETSI14RESTService) {
 	logrus.Info("Server started")
 }
 
-// GetKey - TBD
+// GetKey - TBD.
 func (s *ETSI14RESTService) GetKey(ctx context.Context, slaveSAEID interface{}, number int64, size int64) (restserver.ImplResponse, error) {
 	// TODO - update GetKey with the required logic for this service method.
 	// Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -56,7 +56,7 @@ func (s *ETSI14RESTService) GetKey(ctx context.Context, slaveSAEID interface{},
 	return restserver.Response(http.StatusOK, keyContainer), nil
 }
 
-// GetKeyPost -
+// GetKeyPost -.
 func (s *ETSI14RESTService) GetKeyPost(ctx context.Context, slaveSAEID interface{}, keyRequest restserver.KeyRequest) (restserver.ImplResponse, error) {
 	// TODO - update GetKeyPost with the required logic for this service method.
 	// Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -82,7 +82,7 @@ func (s *ETSI14RESTService) GetKeyPost(ctx context.Context, slaveSAEID interface
 	return restserver.Response(http.StatusOK, keyContainer), nil
 }
 
-// GetKeyWithIds - TBD
+// GetKeyWithIds - TBD.
 func (s *ETSI14RESTService) GetKeyWithIds(ctx context.Context, masterSAEID interface{}, keyID string) (restserver.ImplResponse, error) {
 	// TODO - update GetKeyWithIds with the required logic for this service method.
 	// Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -108,7 +108,7 @@ func (s *ETSI14RESTService) GetKeyWithIds(ctx context.Context, masterSAEID inter
 	return restserver.Response(http.StatusOK, keyContainer), nil
 }
 
-// GetKeyWithIdsPost - TBD
+// GetKeyWithIdsPost - TBD.
 func (s *ETSI14RESTService) GetKeyWithIdsPost(ctx context.Context, masterSAEID interface{}, keyIdsRequest restserver.KeyIdsRequest) (restserver.ImplResponse, error) {
 	// TODO - update GetKeyWithIdsPost with the required logic for this service method.
 	// Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
@@ -134,7 +134,7 @@ func (s *ETSI14RESTService) GetKeyWithIdsPost(ctx context.Context, masterSAEID i
 	return restserver.Response(http.StatusOK, keyContainer), nil
 }
 
-// GetStatus - TBD
+// GetStatus - TBD.
 func (s *ETSI14RESTService) GetStatus(ctx context.Context, slaveSAEID interface{}) (restserver.ImplResponse, error) {
 	// TODO - update GetStatus with the required logic for this service method.
 	// Add api_default_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation.
diff --git a/quantumlayer/quantumlayer-emu-prng.go b/quantumlayer/quantumlayer-emu-prng.go
index d70095ad..9d57982b 100644
--- a/quantumlayer/quantumlayer-emu-prng.go
+++ b/quantumlayer/quantumlayer-emu-prng.go
@@ -7,7 +7,7 @@ package quantumlayer
  * sender to a quantum receiver.
  * This relies on crypto/rand to generate the random numbers that will be
  * transmitted to the other end.
- *
+ *.
  */
 import (
 	"context"
@@ -86,9 +86,8 @@ func NewQuantumlayerEmuPRNG(client pb.KmsQkdmCommunicationServiceClient, logOutp
 	}
 }
 
-// Configure the quantum emulation, but do not start if yet
+// Configure the quantum emulation, but do not start if yet.
 func (qlemuprng *QuantumlayerEmuPRNG) Configure(enableKeyGeneration bool, localQLAddress ...string) {
-
 	// Start receiving numberstores
 	go qlemuprng.peerNumbers.receiveNumbers(qlemuprng.incomingRandNums, qlemuprng.client)
 
@@ -104,7 +103,7 @@ func (qlemuprng *QuantumlayerEmuPRNG) Configure(enableKeyGeneration bool, localQ
 }
 
 // Power on the quantum layer, i.e., open up the communication ports for the
-// other quantum module
+// other quantum module.
 func (qlemuprng *QuantumlayerEmuPRNG) PowerOn() {
 	if !qlemuprng.configured {
 		// nothing do here move on
@@ -183,7 +182,7 @@ func (qlemuprng *QuantumlayerEmuPRNG) PowerOn() {
 }
 
 // Power off the quantum layer, i.e., close the communication ports for the
-// other quantum module
+// other quantum module.
 func (qlemuprng *QuantumlayerEmuPRNG) PowerOff() {
 	qlemuprng.poweron = false
 	log.Println("QuantumlayerEmuPRNG: is powered off...discharging.")
@@ -292,7 +291,7 @@ type NumberStore struct {
 	topOfStorage   int
 }
 
-// Generates a new store with given maximum number of bytes
+// Generates a new store with given maximum number of bytes.
 func NewNumberStore(maxBytes int) (newNS *NumberStore) {
 	return &NumberStore{
 		maxBytes:     maxBytes,
diff --git a/quantumlayer/quantumlayer-emu-prng_test.go b/quantumlayer/quantumlayer-emu-prng_test.go
index 55854214..fdaa5e77 100644
--- a/quantumlayer/quantumlayer-emu-prng_test.go
+++ b/quantumlayer/quantumlayer-emu-prng_test.go
@@ -13,7 +13,6 @@ import (
 )
 
 func TestQuantumLayer(t *testing.T) {
-
 	// Generate UDPAddr for ql1 peer
 	udpQL2AddrString := fmt.Sprintf("127.0.0.1:%d", 5002)
 	udpQL2Addr, err := net.ResolveUDPAddr("udp", udpQL2AddrString)
@@ -57,6 +56,5 @@ func TestQuantumLayer(t *testing.T) {
 		// TODO: Calculate checksum of BulkKey and double-check
 
 		time.Sleep(5 * time.Second)
-
 	}
 }
-- 
GitLab