nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 I actually liked the Value() "useless tag method" in go-nostr. what's your recommended way to just get a tag value? do you actually prefer to check slice len and index everytime?

https://github.com/nbd-wtf/go-nostr/commit/a52165fb7d4c1b5530b6de7cef33ae8fa695e570

Reply to this note

Please Login to reply.

Discussion

I never used it because every single time I was just iterating through a slice of tags and checking if they had len() > 2 in the beginning of the loop, then I would just use normal indexing to get the value as .Value() felt excessive.

I guess we could undeprecate that since all my annoying (and highly breaking) personal preferences have moved to the "v2" of go-nostr.

Oh, also .Find() now already checks if len() >= 2, so you if you use that you are safe.

ack. ill checkout your v2 👀