From f1830f8624fba820c47f71084a4e85d02b5e9f51 Mon Sep 17 00:00:00 2001 From: vbasiuk Date: Thu, 19 Dec 2024 13:59:01 +0200 Subject: [PATCH] linter --- protocol/discovery_protocol.go | 15 +++++++++++---- protocol/discovery_protocol_test.go | 16 ++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/protocol/discovery_protocol.go b/protocol/discovery_protocol.go index 314658e..9445832 100644 --- a/protocol/discovery_protocol.go +++ b/protocol/discovery_protocol.go @@ -2,14 +2,21 @@ package protocol import "github.com/iden3/iden3comm/v2" -// DiscoveryFeatureType is type for query feature-type. +// DiscoveryProtocolFeatureType is type for query feature-type. type DiscoveryProtocolFeatureType string const ( - DiscoveryProtocolFeatureTypeAccept DiscoveryProtocolFeatureType = "accept" + // DiscoveryProtocolFeatureTypeAccept is "accept" type for query feature-type. + DiscoveryProtocolFeatureTypeAccept DiscoveryProtocolFeatureType = "accept" + + // DiscoveryProtocolFeatureTypeProtocol is "protocol" type for query feature-type. DiscoveryProtocolFeatureTypeProtocol DiscoveryProtocolFeatureType = "protocol" + + // DiscoveryProtocolFeatureTypeGoalCode is "goal-code" type for query feature-type. DiscoveryProtocolFeatureTypeGoalCode DiscoveryProtocolFeatureType = "goal-code" - DiscoveryProtocolFeatureTypeHeader DiscoveryProtocolFeatureType = "header" + + // DiscoveryProtocolFeatureTypeHeader is "header" type for query feature-type. + DiscoveryProtocolFeatureTypeHeader DiscoveryProtocolFeatureType = "header" ) // DiscoverFeatureQueriesMessage represents discover feature queries message. @@ -63,5 +70,5 @@ type DiscoverFeatureDiscloseMessageBody struct { // DiscoverFeatureDisclosure represents discover feature disclosure. type DiscoverFeatureDisclosure struct { FeatureType DiscoveryProtocolFeatureType `json:"feature-type"` - Id string `json:"id"` + ID string `json:"id"` } diff --git a/protocol/discovery_protocol_test.go b/protocol/discovery_protocol_test.go index 5273888..69cbe4c 100644 --- a/protocol/discovery_protocol_test.go +++ b/protocol/discovery_protocol_test.go @@ -85,35 +85,35 @@ func TestDiscoverFeatureDisclosuresMessageCreation(t *testing.T) { Disclosures: []protocol.DiscoverFeatureDisclosure{ { FeatureType: protocol.DiscoveryProtocolFeatureTypeAccept, - Id: "iden3comm/v1;env=application/iden3-zkp-json;circuitId=authV2,authV3;alg=groth16", + ID: "iden3comm/v1;env=application/iden3-zkp-json;circuitId=authV2,authV3;alg=groth16", }, { FeatureType: protocol.DiscoveryProtocolFeatureTypeAccept, - Id: "iden3comm/v1;env=application/iden3comm-signed-json;alg=ES256K-R", + ID: "iden3comm/v1;env=application/iden3comm-signed-json;alg=ES256K-R", }, { FeatureType: protocol.DiscoveryProtocolFeatureTypeProtocol, - Id: "https://iden3-communication.io/authorization/1.0", + ID: "https://iden3-communication.io/authorization/1.0", }, { FeatureType: protocol.DiscoveryProtocolFeatureTypeHeader, - Id: "id", + ID: "id", }, { FeatureType: protocol.DiscoveryProtocolFeatureTypeHeader, - Id: "type", + ID: "type", }, { FeatureType: protocol.DiscoveryProtocolFeatureTypeHeader, - Id: "body", + ID: "body", }, { FeatureType: protocol.DiscoveryProtocolFeatureTypeHeader, - Id: "created_time", + ID: "created_time", }, { FeatureType: protocol.DiscoveryProtocolFeatureTypeHeader, - Id: "expires_time", + ID: "expires_time", }, }, },