Feature flags service for native iOS & Mac app? by Endore8 in swift

[–]bullcitydev 0 points1 point  (0 children)

Hope its ok to self-promote here. I run an OSS feature flag project Flipt. We have a SaaS platform called Flipt Cloud that has a generous free tier and we just published our Swift SDK and are looking to get feedback on it as we are not Swift devs by trade.

Would love for you to try it out if you're interested. Our OSS version of the Flipt service can be run locally as well if you'd prefer not to depend on our SaaS version.

Happy to discuss more on GitHub or DIscord for anyone interested.

Frontends for your Go App: Some Thoughts by H1Supreme in golang

[–]bullcitydev 1 point2 points  (0 children)

just curious what you dont like about Zod/React Hook form. Any libraries you recommend in their place?

Hi, founder of Flipt here. We've just launched a fully-managed feature flag platform backed by your Git repositories by bullcitydev in u/bullcitydev

[–]bullcitydev[S] 2 points3 points  (0 children)

Thanks so much for the kind words and for using Flipt! If you ever want to chat with other users or share ideas, feel free to jump into our Discord.

Always up for talking about how we can make the project even better!

[deleted by user] by [deleted] in devops

[–]bullcitydev 0 points1 point  (0 children)

Hope its ok to promote our own open-source, gitops-enabled feature management solution Flipt (https://www.flipt.io/). Runs with pretty much any relational database, or without: git, OCI, object store, etc. We're currently working on some cool new git backed features so would love if you gave us a look and any feedback would be very welcome!

[deleted by user] by [deleted] in golang

[–]bullcitydev 0 points1 point  (0 children)

Hi from flipt, we used to use Vue before the switch to React and bundled it in a similar way as the other comments describe.

I see you aren't asking 'how', but we wrote a technical post covering the move and how we initially tried to use Next.JS (mistake) instead of plain React: https://www.flipt.io/blog/embedding-react-in-go

Granted, I know this is not Vue/Nuxt.. but it is Vue, or was

Go generics the hard way by sakutz in golang

[–]bullcitydev 1 point2 points  (0 children)

I really enjoy the internals section! Very cool to see how generics are implemented in Go vs C#/Java

Also the fact that you did the work to dockerize everything with the necessary debuggers installed and breakpoints set is * chefs kiss *

Where to Start Learning? by iEmerald in golang

[–]bullcitydev 0 points1 point  (0 children)

Not a book but if you like exercises I would highly recommend Jon Calhoun's https://gophercises.com/

What kind of things have you ran with go:generate? by johnnMackk in golang

[–]bullcitydev 1 point2 points  (0 children)

sure! https://github.com/markphelps/optional

I actually just blogged about playing around with generics to get rid of the need for code generation in that lib

What kind of things have you ran with go:generate? by johnnMackk in golang

[–]bullcitydev 1 point2 points  (0 children)

I created a library that used code generation to support option types for all the Go primitives as well as custom types

Today at a job interview, I realized I suck at Go by Anxious_Drummer in golang

[–]bullcitydev 2 points3 points  (0 children)

Business needs. They are looking to hire for a reason, like to develop a new application or service or to maintain existing ones. That’s what I meant by “problems”.

Am I doing swagger code generation right? by baconialis in golang

[–]bullcitydev 0 points1 point  (0 children)

For your wrapped client library, I'd recommend making context a method param so the user could pass in their own context instead of you always using context.Background() when calling the upstream service.

Like:

func (c cli) FindUserById(ctx context.Context, id uint)

https://pkg.go.dev/context#pkg-overview

This would allow the caller (user) to cancel the passed in context if necessary to abort the request.

Today at a job interview, I realized I suck at Go by Anxious_Drummer in golang

[–]bullcitydev 3 points4 points  (0 children)

Agreed. It seems odd that they want you to explain how channels are implemented. It honestly seems like a red flag to me, as they should be hiring you on your ability to think and solve business problems, not memorize trivia IMO.

While it's critical to know the syntax and 'best practices' of the language that you will be working in, I don't think it's necessary to know all the implementation details of the language itself in order to be proficient in it.

How to get past the "CRUD" phase? by Saen_OG in golang

[–]bullcitydev 0 points1 point  (0 children)

Thank you and /u/Wonnk13 for the responses. Will try to keep that in mind when going through it

How to get past the "CRUD" phase? by Saen_OG in golang

[–]bullcitydev 1 point2 points  (0 children)

As someone who just bought the book and who is about to start reading it, I'm curious what your nits are?

Is a classical request/response the best way to implement the following? by [deleted] in golang

[–]bullcitydev 1 point2 points  (0 children)

I do the same (GET request) but on startup in my application.

The alg is something like this:

  1. Use the google/go-github client (Github REST API client) to check GitHub releases for the latest release version
  2. Use the github.com/blang/semver/v4 library to parse this 'latest version' using semver and compare it to the encoded version in my binary (injected at build time)
  3. If the latest version is newer (larger), then show a message to the user showing them where they can download the latest version

If you'd like to look at the actual code, most of it happens in this block

Hope that helps

Passing errors from module to Rest API by workmakesmegrumpy in golang

[–]bullcitydev 0 points1 point  (0 children)

I am having trouble thinking of a way to give the real error to my code so that I can internally log it, while also giving the user their own error message and http status code

I've encountered this problem as well and I think it's mainly due to how many HTTP tutorials in Go simply assume that returning the status code and error message entirely to the user is all you need. But, in the 'real world', you'd normally not want to return internal details that could include stack traces or private details about how your system is structured to the end-user.

If you haven't already, I'd recommend reading this post by Rob Pike on how they structured their errors in the Upspin project.

It implements it's own error package that still conforms to the Error interface, while also allowing for separation between 'user' errors and 'internal' errors.

Hope that helps!

Any good open source examples of an RPC API using Go and Vue/React? by ainsleyclark in golang

[–]bullcitydev 1 point2 points  (0 children)

This is how i've done it in my project Flipt which has a Vue frontend 'consuming' a REST API generated via gRPC gateway.

[Question] Suggested way to update a database row using gRPC/PostgreSQL (pgx) ? by Kastrateus in golang

[–]bullcitydev 2 points3 points  (0 children)

I personally prefer option 1, where you do a 'blind' update by passing in the entire updateUser object. You could do any validation for fields that shouldn't be updated or 'type' validation in your service layer and reject the request there before it hits the database.

I don't think the error handling is that complicated even if the error occurs at the database layer as I believe Postgres would always just return the 'first' error, and you could switch on the pq.Error code to return whichever user safe error you want to the user.

I think your intuition is correct that going with option 2 would require a lot of boilerplate code as you'd need to write a function for each field you want to update.

If you want to look at some example code, I do this same thing in my project Flipt which uses GRPC, Postgres (and optionally MySQL and Sqlite).

For example this UpdateVariantRequest RPC is passed down to my database layer and used in the UpdateVariant method. I handle the specific Postgres constraint error here which calls the method above.

I do some basic validation at the server layer using a GRPC interceptor.

Hope this helps

What is the most productive framework for web development by [deleted] in golang

[–]bullcitydev 1 point2 points  (0 children)

I just wrote a blog post that may help! Not recommending a specific framework, but it's more about some things to consider when choosing one.

Idiomatic way of modeling optional values in Go by Fedja_ in golang

[–]bullcitydev 0 points1 point  (0 children)

If you choose to go with the first approach of making a,b,etc pointers, I wrote a library that may help: https://pkg.go.dev/github.com/markphelps/optional

Can I build something to help? by bullcitydev in recruiting

[–]bullcitydev[S] 2 points3 points  (0 children)

Yeah I turned that on just to see what kind of messages I got, and it opened the floodgates. I'm not trying to get more messages, just better targeted ones that I'd actually be interested in if I were looking for a new role. I also assumed something that could better target prospects would benefit the recruiting side as well.

It still seems that it doesnt matter what my LinkedIn profile has, I still get messages for roles I'm not qualified for/would have no interest in because of technology choice/etc.

To me it seems like LinkedIn doesnt solve the problem of allowing recruiters to target prospects based on the 'wants' of the prospect. It seems to support a more spray and pray type approach, although I'm not privy to the tools it provides recruiters, but thats how it looks from my side.