diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-04-01 19:35:54 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-04-01 19:35:54 +0300 |
commit | 86cbbcb8bd3c62f0e1af0188cf7fb83cb89df6c4 (patch) | |
tree | 36a2105a5d40fe134a519ce28af65bc5b5620c83 /telegram | |
parent | 2f38af12a28cdf92d587711965c170fbeafa41d8 (diff) |
gofmtv1.2.0
Diffstat (limited to 'telegram')
-rw-r--r-- | telegram/formatter/formatter.go | 10 | ||||
-rw-r--r-- | telegram/utils.go | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/telegram/formatter/formatter.go b/telegram/formatter/formatter.go index 4d37be1..740fa09 100644 --- a/telegram/formatter/formatter.go +++ b/telegram/formatter/formatter.go @@ -140,20 +140,20 @@ func ClaspDirectives(text string, entities []*client.TextEntity) []*client.TextE endOffset := entity.Offset + entity.Length if unicode.IsSpace(doubledRunes[entity.Offset]) { - for j, r := range doubledRunes[entity.Offset+1:endOffset] { + for j, r := range doubledRunes[entity.Offset+1 : endOffset] { if !unicode.IsSpace(r) { dirty = true - entity.Offset += int32(j+1) - entity.Length -= int32(j+1) + entity.Offset += int32(j + 1) + entity.Length -= int32(j + 1) break } } } if unicode.IsSpace(doubledRunes[endOffset-1]) { - for j := endOffset-2; j >= entity.Offset; j-- { + for j := endOffset - 2; j >= entity.Offset; j-- { if !unicode.IsSpace(doubledRunes[j]) { dirty = true - entity.Length = j+1-entity.Offset + entity.Length = j + 1 - entity.Offset break } } diff --git a/telegram/utils.go b/telegram/utils.go index b41423a..f1f7f52 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -375,12 +375,12 @@ func (c *Client) formatFile(file *client.File, compact bool) string { return "" } - size64:= uint64(file.Size) + size64 := uint64(file.Size) c.prepareDiskSpace(size64) basename := file.Remote.UniqueId + filepath.Ext(src) dest := c.content.Path + "/" + basename // destination path - link = c.content.Link + "/" + basename // download link + link = c.content.Link + "/" + basename // download link // move err = os.Rename(src, dest) |