Skip to content

Commit 38de539

Browse files
committed
fix: mispell fixes
Signed-off-by: Pierre-Henri Symoneaux <[email protected]>
1 parent d1bed38 commit 38de539

9 files changed

+17
-17
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ See [examples](./examples) for more possibilities.
259259
| Protect Stop Date ||||||
260260
| Deactivation Date ||||||
261261
| Destroy Date ||||||
262-
| Compromise Occurence Date ||||||
262+
| Compromise Occurrence Date ||||||
263263
| Compromise Date ||||||
264264
| Revocation Reason ||||||
265265
| Archive Date ||||||

attributes.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const (
2929
AttributeNameProtectStopDate AttributeName = "Protect Stop Date"
3030
AttributeNameDeactivationDate AttributeName = "Deactivation Date"
3131
AttributeNameDestroyDate AttributeName = "Destroy Date"
32-
AttributeNameCompromiseOccurenceDate AttributeName = "Compromise Occurence Date"
32+
AttributeNameCompromiseOccurrenceDate AttributeName = "Compromise Occurrence Date"
3333
AttributeNameCompromiseDate AttributeName = "Compromise Date"
3434
AttributeNameArchiveDate AttributeName = "Archive Date"
3535
AttributeNameLastChangeDate AttributeName = "Last Change Date"
@@ -83,7 +83,7 @@ const (
8383
var AllAttributeNames = []AttributeName{
8484
AttributeNameUniqueIdentifier, AttributeNameName, AttributeNameObjectType, AttributeNameOperationPolicyName, AttributeNameObjectGroup,
8585
AttributeNameContactInformation, AttributeNameInitialDate, AttributeNameActivationDate, AttributeNameProcessStartDate, AttributeNameProtectStopDate,
86-
AttributeNameDeactivationDate, AttributeNameDestroyDate, AttributeNameCompromiseOccurenceDate, AttributeNameCompromiseDate, AttributeNameArchiveDate,
86+
AttributeNameDeactivationDate, AttributeNameDestroyDate, AttributeNameCompromiseOccurrenceDate, AttributeNameCompromiseDate, AttributeNameArchiveDate,
8787
AttributeNameLastChangeDate, AttributeNameCryptographicLength, AttributeNameLeaseTime, AttributeNameCryptographicAlgorithm, AttributeNameCryptographicParameters,
8888
AttributeNameCryptographicDomainParameters, AttributeNameCertificateType, AttributeNameDigest, AttributeNameCryptographicUsageMask, AttributeNameState, AttributeNameRevocationReason,
8989
AttributeNameLink, AttributeNameCertificateIdentifier, AttributeNameCertificateSubject, AttributeNameCertificateIssuer, AttributeNameUsageLimits,
@@ -106,7 +106,7 @@ var attrTypes = map[AttributeName]reflect.Type{
106106
AttributeNameProtectStopDate: reflect.TypeFor[time.Time](),
107107
AttributeNameDeactivationDate: reflect.TypeFor[time.Time](),
108108
AttributeNameDestroyDate: reflect.TypeFor[time.Time](),
109-
AttributeNameCompromiseOccurenceDate: reflect.TypeFor[time.Time](),
109+
AttributeNameCompromiseOccurrenceDate: reflect.TypeFor[time.Time](),
110110
AttributeNameCompromiseDate: reflect.TypeFor[time.Time](),
111111
AttributeNameArchiveDate: reflect.TypeFor[time.Time](),
112112
AttributeNameLastChangeDate: reflect.TypeFor[time.Time](),

kmipclient/client.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type opts struct {
2626
certs []tls.Certificate
2727
serverName string
2828
//TODO: Add KMIP Authentication / Credentials
29-
//TODO: Overwrite default/prefered/supported key formats for register
29+
//TODO: Overwrite default/preferred/supported key formats for register
3030
}
3131

3232
func (o *opts) tlsConfig() (*tls.Config, error) {
@@ -208,8 +208,8 @@ func DialContext(ctx context.Context, addr string, options ...Option) (*Client,
208208
addr: addr,
209209
}
210210

211-
// Negociate protocol version
212-
if err := c.negociateVersion(ctx); err != nil {
211+
// Negotiate protocol version
212+
if err := c.negotiateVersion(ctx); err != nil {
213213
c.Close()
214214
return nil, err
215215
}
@@ -292,7 +292,7 @@ func (c *Client) Roundtrip(ctx context.Context, msg *kmip.RequestMessage) (*kmip
292292
return next(ctx, msg)
293293
}
294294

295-
func (c *Client) negociateVersion(ctx context.Context) error {
295+
func (c *Client) negotiateVersion(ctx context.Context) error {
296296
if c.version != nil {
297297
return nil
298298
}
@@ -320,7 +320,7 @@ func (c *Client) negociateVersion(ctx context.Context) error {
320320
}
321321
serverVersions := bi.ResponsePayload.(*payloads.DiscoverVersionsResponsePayload).ProtocolVersion
322322
if len(serverVersions) == 0 {
323-
return errors.New("Protocol version negociation failed. No common version found")
323+
return errors.New("Protocol version negotiation failed. No common version found")
324324
}
325325
c.version = &serverVersions[0]
326326
return nil

payloads/activate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (a *ActivateRequestPayload) Operation() kmip.Operation {
2424
return kmip.OperationActivate
2525
}
2626

27-
// Reponse for the activate operation.
27+
// Response for the activate operation.
2828
type ActivateResponsePayload struct {
2929
// The Unique Identifier of the object.
3030
UniqueIdentifier string

payloads/archive_recover.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (pl *ArchiveRequestPayload) Operation() kmip.Operation {
2323
return kmip.OperationArchive
2424
}
2525

26-
// Repsonse for the archive operation.
26+
// Respsonse for the archive operation.
2727
type ArchiveResponsePayload struct {
2828
// The Unique Identifier of the object.
2929
UniqueIdentifier string

ttlv/decoder.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (dec *Decoder) BigInteger(tag int) (*big.Int, error) {
112112
// Enum reads an enum from the internal buffer.
113113
// While `tag` is the tag to write with the value, which may differ from the enum's default tag,
114114
// `realtag` can optionally be set to non-zero to identify the real default tag associated to the enum type.
115-
// It's usefull for deserializing the enum value from its text representation.
115+
// It's useful for deserializing the enum value from its text representation.
116116
func (dec *Decoder) Enum(realtag, tag int) (uint32, error) {
117117
return dec.r.Enum(realtag, tag)
118118
}
@@ -154,7 +154,7 @@ func (dec *Decoder) Interval(tag int) (time.Duration, error) {
154154
// Bitmaks reads a bitmask value from the internal buffer.
155155
// While `tag` is the tag to write with the value, which may differ from the bitmask's default tag,
156156
// `realtag` can optionally be set to non-zero to identify the real default tag associated to the bitmask type.
157-
// It's usefull for deserializing the bitmask value from its text representation.
157+
// It's useful for deserializing the bitmask value from its text representation.
158158
func (dec *Decoder) Bitmask(realtag, tag int) (int32, error) {
159159
return dec.r.Bitmask(realtag, tag)
160160
}

ttlv/encoder.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (enc *Encoder) BigInteger(tag int, value *big.Int) {
8989
// Enum writes an enum to the internal buffer.
9090
// While `tag` is the tag to write with the value, which may differ from the enum's default tag,
9191
// `realtag` can optionally be set to non-zero to identify the real default tag associated to the enum type.
92-
// It's usefull for serializing the enum value to its text representation.
92+
// It's useful for serializing the enum value to its text representation.
9393
func (enc *Encoder) Enum(realtag, tag int, value uint32) {
9494
enc.w.Enum(realtag, tag, value)
9595
}
@@ -131,7 +131,7 @@ func (enc *Encoder) Interval(tag int, interval time.Duration) {
131131
// Bitmaks writes a bitmask value to the internal buffer.
132132
// While `tag` is the tag to write with the value, which may differ from the bitmask's default tag,
133133
// `realtag` can optionally be set to non-zero to identify the real default tag associated to the bitmask type.
134-
// It's usefull for serializing the bitmask value to its text representation.
134+
// It's useful for serializing the bitmask value to its text representation.
135135
func (enc *Encoder) Bitmask(realtag, tag int, value int32) {
136136
enc.w.Bitmask(realtag, tag, value)
137137
}

ttlv/reflect.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func getFieldTag(fldT reflect.StructField, tagVal string) int {
6464
// Check if we already know a tag with the same name as the field
6565
return tg
6666
} else if tg, err := getTagForType(fldT.Type); err == nil {
67-
// if not check if we know the default tag for this type (either explicitely registered, or fallback to type name)
67+
// if not check if we know the default tag for this type (either explicitly registered, or fallback to type name)
6868
return tg
6969
}
7070
return 0

ttlv/registry.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func appendBitmaskString[T ~int32](dst []byte, tag int, value T, sep string) []b
188188
continue
189189
}
190190
// Handle case where it's not registered
191-
// by writting 0x prefixed hex value
191+
// by writing 0x prefixed hex value
192192
dst = fmt.Appendf(dst, "0x%08X", uint32(v))
193193
}
194194
return dst

0 commit comments

Comments
 (0)