Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion adata.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ func (spec Spec) MarshalJSON() ([]byte, error) {
spec.Compression,
},
)

}

func (spec *Spec) UnmarshalJSON(data []byte) error {
Expand Down
6 changes: 3 additions & 3 deletions cmd/privatebin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion compression_algorithm.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ func (ca CompressionAlgorithm) String() string {
case CompressionAlgorithmGZip:
return "zlib"
default:
return "unknow"
return "unknown"
}
}
2 changes: 1 addition & 1 deletion encryption_algorithm.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ func (ea EncryptionAlgorithm) String() string {
case EncryptionAlgorithmAES:
return "aes"
default:
return "unknow"
return "unknown"
}
}
2 changes: 1 addition & 1 deletion encryption_mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ func (em EncryptionMode) String() string {
case EncryptionModeGCM:
return "gcm"
default:
return "unknow"
return "unknown"
}
}
6 changes: 3 additions & 3 deletions paste.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
type (
Paste struct {
Data []byte
Attachement []byte
Attachment []byte
AttachmentName string
MimeType string
}
Expand All @@ -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)
Expand All @@ -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),
)
}

Expand Down
Loading