gruik

Fork of GCU-Squad's RSS-to-IRC bridge
git clone https://git.instinctive.eu/gruik.git
Log | Files | Refs | README | LICENSE

commit 5122eaba3193c0f5d8fde305eae6d0a3dff4c06d
parent b55d622b1e6f2f64b623a57663efb1c119a350ed
Author: Emile 'iMil' Heitor <imil@NetBSD.org>
Date:   Tue, 18 Jul 2023 08:11:55 +0200

fix: hash over link, title changes too often

Diffstat:
Mmain.go | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/main.go b/main.go @@ -27,9 +27,8 @@ type News struct { var newsList []News -// Create a hash out of news title and link -func mkHash(s1, s2 string) string { - s := s1 + s2 +// Create a hash out of link +func mkHash(s string) string { h := sha256.Sum256([]byte(s)) hash := hex.EncodeToString(h[:]) return hash[:8]