From edfc25e18c4585b2deed7b7d9531cc3fcecf1d4f Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Tue, 14 Jul 2026 19:09:21 -0500 Subject: fix: resolve golandci-lint errors --- deviantion.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'deviantion.go') diff --git a/deviantion.go b/deviantion.go index 288b0e2..197f2af 100644 --- a/deviantion.go +++ b/deviantion.go @@ -149,12 +149,15 @@ func GetDeviation(id string, user string) (st Post, err Error) { } } - json.Unmarshal([]byte(txt), &description) - for _, a := range description.Blocks { - txt = a.Text - } - } + if err := json.Unmarshal([]byte(txt), &description); err != nil { + // Handle error appropriately + try(err) // or log/return the error + } + for _, a := range description.Blocks { + txt = a.Text + } + } st.Description = txt - + return } -- cgit v1.2.3