aboutsummaryrefslogtreecommitdiff
path: root/hotline/news.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-05-28 11:35:50 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-05-28 11:35:50 -0700
commitaebc4d3647b9823ae8cbb57b21b1af83bfd011fb (patch)
tree6fa8871ec45654b68e6b018d6d06969d21b7278f /hotline/news.go
parentdecc2fbf5db4a05aec93462ad35d890930bddd04 (diff)
Misc cleanup
* Removed some unnecessary user of pointers * Removed dead cruft * Reorganized code
Diffstat (limited to 'hotline/news.go')
-rw-r--r--hotline/news.go33
1 files changed, 6 insertions, 27 deletions
diff --git a/hotline/news.go b/hotline/news.go
index a6b8372..77c6696 100644
--- a/hotline/news.go
+++ b/hotline/news.go
@@ -12,7 +12,7 @@ type ThreadedNews struct {
}
type NewsCategoryListData15 struct {
- Type []byte `yaml:"Type"` //Size 2 ; Bundle (2) or category (3)
+ Type []byte `yaml:"Type"` // Size 2 ; Bundle (2) or category (3)
Count []byte // Article or SubCategory count Size 2
NameSize byte
Name string `yaml:"Name"` //
@@ -64,11 +64,11 @@ func (newscat *NewsCategoryListData15) GetNewsArtListData() NewsArtListData {
type NewsArtData struct {
Title string `yaml:"Title"`
Poster string `yaml:"Poster"`
- Date []byte `yaml:"Date"` //size 8
- PrevArt []byte `yaml:"PrevArt"` //size 4
- NextArt []byte `yaml:"NextArt"` //size 4
- ParentArt []byte `yaml:"ParentArt"` //size 4
- FirstChildArt []byte `yaml:"FirstChildArtArt"` //size 4
+ Date []byte `yaml:"Date"` // size 8
+ PrevArt []byte `yaml:"PrevArt"` // size 4
+ NextArt []byte `yaml:"NextArt"` // size 4
+ ParentArt []byte `yaml:"ParentArt"` // size 4
+ FirstChildArt []byte `yaml:"FirstChildArtArt"` // size 4
DataFlav []byte `yaml:"DataFlav"` // "text/plain"
Data string `yaml:"Data"`
}
@@ -202,27 +202,6 @@ func (newscat *NewsCategoryListData15) nameLen() []byte {
return []byte{uint8(len(newscat.Name))}
}
-//type NewsPath struct {
-// Paths []string
-//}
-//
-//func (np *NewsPath) Payload() []byte {
-// var out []byte
-//
-// count := make([]byte, 2)
-// binary.BigEndian.PutUint16(count, uint16(len(np.Paths)))
-//
-// out = append(out, count...)
-// for _, p := range np.Paths {
-// pLen := byte(len(p))
-// out = append(out, []byte{0, 0}...) // what is this?
-// out = append(out, pLen)
-// out = append(out, []byte(p)...)
-// }
-//
-// return out
-//}
-
func ReadNewsPath(newsPath []byte) []string {
if len(newsPath) == 0 {
return []string{}