aboutsummaryrefslogtreecommitdiff
path: root/comments.go
diff options
context:
space:
mode:
authorlost+skunk <[email protected]>2024-06-14 00:05:21 +0300
committerlost+skunk <[email protected]>2024-06-14 00:05:21 +0300
commit8f645d7ccb01c15650958f2f9dd14f15f9afd72b (patch)
tree73725978cf40a28c477867b1470fe30846442094 /comments.go
parentfd031a255bdd8fab8db24d41535959276e815e70 (diff)
downloaddevianter-8f645d7ccb01c15650958f2f9dd14f15f9afd72b.tar.gz
devianter-8f645d7ccb01c15650958f2f9dd14f15f9afd72b.tar.bz2
devianter-8f645d7ccb01c15650958f2f9dd14f15f9afd72b.zip
небольшие улучшения
Diffstat (limited to 'comments.go')
-rw-r--r--comments.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/comments.go b/comments.go
index 7b3bb3d..a78ab1a 100644
--- a/comments.go
+++ b/comments.go
@@ -6,7 +6,7 @@ import (
"strings"
)
-type comments struct {
+type Comments struct {
Cursor string
PrevOffset int
HasMore, HasLess bool
@@ -33,12 +33,12 @@ type comments struct {
}
// функция для обработки комментариев поста, пользователя, группы и многого другого
-func Comments(
+func CommentsFunc(
postid string,
cursor string,
page int,
typ int, // 1 - комментарии поста; 4 - комментарии на стене группы или пользователя
-) (cmmts comments) {
+) (cmmts Comments) {
for x := 0; x <= page; x++ {
ujson(
"dashared/comments/thread?typeid="+strconv.Itoa(typ)+
@@ -55,7 +55,7 @@ func Comments(
cmmts.Thread[i].Comment = m
// если начало строки {, а конец }, то срабатывает этот иф
- if m[0] == 123 && m[l-1] == 125 {
+ if m[0] == '{' && m[l-1] == '}' {
var content struct {
Blocks []struct {
Text string