Skip to content

Commit 9239067

Browse files
committed
[codespell]: Fix typos.
Signed-off-by: Martin Dosch <martin@mdosch.de>
1 parent 7a9d4ce commit 9239067

7 files changed

Lines changed: 10 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6161
### Added
6262

6363
- Add `-filename` flag to read file instead of stdin.
64-
- Add `-attachment` flag to update data as an attchment.
64+
- Add `-attachment` flag to update data as an attachment.
6565

6666
### Changed
6767

adata.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ func (spec Spec) MarshalJSON() ([]byte, error) {
101101
spec.Compression,
102102
},
103103
)
104-
105104
}
106105

107106
func (spec *Spec) UnmarshalJSON(data []byte) error {

cmd/privatebin/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ import (
3434

3535
var (
3636
version = "dev"
37-
commit = "unknow"
38-
date = "unknow"
37+
commit = "unknown"
38+
date = "unknown"
3939

4040
userAgent = "privatebin-cli/" + version + " (source; https://go.gearno.de/privatebin)"
4141
cfgPath string
@@ -196,7 +196,7 @@ var (
196196
"paste_id": result.PasteID,
197197
"paste": map[string]string{
198198
"attachment_name": result.Paste.AttachmentName,
199-
"attachment": base64.StdEncoding.EncodeToString(result.Paste.Attachement),
199+
"attachment": base64.StdEncoding.EncodeToString(result.Paste.Attachment),
200200
"data": base64.StdEncoding.EncodeToString(result.Paste.Data),
201201
},
202202
"comment_count": result.CommentCount,

compression_algorithm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ func (ca CompressionAlgorithm) String() string {
6262
case CompressionAlgorithmGZip:
6363
return "zlib"
6464
default:
65-
return "unknow"
65+
return "unknown"
6666
}
6767
}

encryption_algorithm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ func (ea EncryptionAlgorithm) String() string {
5757
case EncryptionAlgorithmAES:
5858
return "aes"
5959
default:
60-
return "unknow"
60+
return "unknown"
6161
}
6262
}

encryption_mode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ func (em EncryptionMode) String() string {
5757
case EncryptionModeGCM:
5858
return "gcm"
5959
default:
60-
return "unknow"
60+
return "unknown"
6161
}
6262
}

paste.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
type (
2929
Paste struct {
3030
Data []byte
31-
Attachement []byte
31+
Attachment []byte
3232
AttachmentName string
3333
MimeType string
3434
}
@@ -37,7 +37,7 @@ type (
3737
func (p Paste) MarshalJSON() ([]byte, error) {
3838
output := map[string]string{}
3939

40-
if len(p.Attachement) > 0 {
40+
if len(p.Attachment) > 0 {
4141
mimeType := p.MimeType
4242
if mimeType == "" {
4343
ext := filepath.Ext(p.AttachmentName)
@@ -54,7 +54,7 @@ func (p Paste) MarshalJSON() ([]byte, error) {
5454
output["attachment"] = fmt.Sprintf(
5555
"data:%s;base64,%s",
5656
mimeType,
57-
base64.StdEncoding.EncodeToString(p.Attachement),
57+
base64.StdEncoding.EncodeToString(p.Attachment),
5858
)
5959
}
6060

0 commit comments

Comments
 (0)