diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eded12..745324a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,7 +61,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added - Add `-filename` flag to read file instead of stdin. -- Add `-attachment` flag to update data as an attchment. +- Add `-attachment` flag to update data as an attachment. ### Changed diff --git a/adata.go b/adata.go index 0f919f7..e6e5e1a 100644 --- a/adata.go +++ b/adata.go @@ -101,7 +101,6 @@ func (spec Spec) MarshalJSON() ([]byte, error) { spec.Compression, }, ) - } func (spec *Spec) UnmarshalJSON(data []byte) error { diff --git a/cmd/privatebin/main.go b/cmd/privatebin/main.go index bee6e71..86f3484 100644 --- a/cmd/privatebin/main.go +++ b/cmd/privatebin/main.go @@ -34,8 +34,8 @@ import ( var ( version = "dev" - commit = "unknow" - date = "unknow" + commit = "unknown" + date = "unknown" userAgent = "privatebin-cli/" + version + " (source; https://go.gearno.de/privatebin)" cfgPath string @@ -196,7 +196,7 @@ var ( "paste_id": result.PasteID, "paste": map[string]string{ "attachment_name": result.Paste.AttachmentName, - "attachment": base64.StdEncoding.EncodeToString(result.Paste.Attachement), + "attachment": base64.StdEncoding.EncodeToString(result.Paste.Attachment), "data": base64.StdEncoding.EncodeToString(result.Paste.Data), }, "comment_count": result.CommentCount, diff --git a/compression_algorithm.go b/compression_algorithm.go index f979e7d..af9f003 100644 --- a/compression_algorithm.go +++ b/compression_algorithm.go @@ -62,6 +62,6 @@ func (ca CompressionAlgorithm) String() string { case CompressionAlgorithmGZip: return "zlib" default: - return "unknow" + return "unknown" } } diff --git a/encryption_algorithm.go b/encryption_algorithm.go index 5b9888b..bbe7dad 100644 --- a/encryption_algorithm.go +++ b/encryption_algorithm.go @@ -57,6 +57,6 @@ func (ea EncryptionAlgorithm) String() string { case EncryptionAlgorithmAES: return "aes" default: - return "unknow" + return "unknown" } } diff --git a/encryption_mode.go b/encryption_mode.go index db108a6..c921317 100644 --- a/encryption_mode.go +++ b/encryption_mode.go @@ -57,6 +57,6 @@ func (em EncryptionMode) String() string { case EncryptionModeGCM: return "gcm" default: - return "unknow" + return "unknown" } } diff --git a/paste.go b/paste.go index c8a6cc5..8c3cdbb 100644 --- a/paste.go +++ b/paste.go @@ -28,7 +28,7 @@ import ( type ( Paste struct { Data []byte - Attachement []byte + Attachment []byte AttachmentName string MimeType string } @@ -37,7 +37,7 @@ type ( func (p Paste) MarshalJSON() ([]byte, error) { output := map[string]string{} - if len(p.Attachement) > 0 { + if len(p.Attachment) > 0 { mimeType := p.MimeType if mimeType == "" { ext := filepath.Ext(p.AttachmentName) @@ -54,7 +54,7 @@ func (p Paste) MarshalJSON() ([]byte, error) { output["attachment"] = fmt.Sprintf( "data:%s;base64,%s", mimeType, - base64.StdEncoding.EncodeToString(p.Attachement), + base64.StdEncoding.EncodeToString(p.Attachment), ) }