eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

223
active users

#golang

6 posts6 participants1 post today

Who is familiar with #golang and #tview console UI package?

Quickly made a small program to chat with the Gemini Flash #LLM #AI modal, including context history, and capabilities to store and retrieve chats to continue later.

Included code colouring with #glamour using ANSI control characters.
Kind of a feedback loop as I used the language model as a tview guide, a package I was not familiar with 🙂

Experience so far posted as a reddit post, reactions welcome 👋

reddit.com/r/golang/comments/1

www.reddit.comReddit - The heart of the internet

Hey there! I'm a senior Python dev, expanding into Go territory, and I'm looking for resources to help me get started.

Not so much in learning the actual language, the official website seems to be sufficient for that. (Although I _could_ use a tutorial that's a bit faster and more concise.)

No, what I really need is to learn the _culture_ and best practices. Suggested tooling. Hints for maintaining projects of non-trivial size.

Any pointers? Text and video are fine for me.

What's the eminent Go library for JSON patching and deep merging?

I need to update values on arbitrary data structures for Kubernetes at runtime. I was going to use `k8s.io/client-go/util/jsonpath` but it looks like it's only for /retrieving/ values, not mutating them.

If I can't strictly use the same syntax as Kubernetes then maybe RFC6902 is a reasonable second approach?

rfc-editor.org/rfc/rfc6902

www.rfc-editor.orgRFC 6902: JavaScript Object Notation (JSON) Patch

Golang is the best programming language ever invented.

Checkout my latest blog post on writing better Go code!

Whether you're new to Go or intermediate these best practices will help you write cleaner, more maintainable code.

#programming #golang #developers #coding

dhanushnehru.medium.com/best-p

Medium · Best Practices for Writing Better Go (Golang) Code: A Beginner’s JourneyBy Dhanush N

First Rust app is taking shape. I’m not necessarily convinced yet that I have more confidence in it than in Go code I wrote.
Go always was predictable, worked when it compiled and without surprises if I didn’t do stupid knowingly (equivalent of using unsafe in Rust I guess).
Far more confident in it than I ever was in C(++) which I wrote for a decade.

I still don’t like the syntax of Rust but with a bit more understanding of the borrow checker it makes more sense now. #golang #rust

Yeah, so a lot of us run e2e tests with dependencies against live services.

Feature request: If a user asks to run a single test specifically with a filter, RUN THE TEST!

```
PASS
ok stuff/e2e
(cached)
```

inb4 use a mock service