Git Product home page Git Product logo

go-rest-template's Introduction

I'm Pains, yes that's my last name and I build software stuff. Oh, I also sometimes blog about the stuff I build at blog.lpains.net. I've been coding for way too long now so a day without code is just not a good day. How can it be?

I live in the USA, was born in Brazil and miss living in Australia. Confusing? Yes.

I code anything, really. But there is nothing better than designing an enterprise scale architecture and see the many pieces working nicely together and evolving. I've designed multi-billion dollar software systems and that was fun but I lost nearly all my hair in the process.

What else do I do? I go home and code some more. However, I got some completely unrelated passions. For instance, I am:

  • Kung Fu instructor. I studied under Grand Master Lopes in Kung Fu Taisan.
  • Taekwondo Black Belt
  • Snowboarder. Turn up the music and hit the slopes.
  • Volleyball player. I really wanted to play professional, but apparently you need to be really good and ridiculous tall for that...

Some GitHub stats:

jlucaspains' GitHub Stats jlucaspains' GitHub Top Languages

Blog posts

  1. Apr 7, 2024 - Streamlining App Role Setup with Azure Entra: A Step-by-Step Guide
  2. Mar 26, 2024 - Sharp Cooking now displays nutrition labels
  3. Jan 27, 2024 - How to benchmark javascript coding options
  4. Jan 1, 2024 - Converting sharp-recipe-parser from typescript to javascript + jsdoc
  5. Dec 10, 2023 - Introducing azdiff: Simplifying Azure Environment Comparison

go-rest-template's People

Contributors

dependabot[bot] avatar jlucaspains avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dh-i

go-rest-template's Issues

Issues raised by reddit community

Feedback from gmhafiz on reddit:

  • You use both github.com/golang-jwt/jwt and github.com/lestrrat-go/jwx. it doesn't look like you are using golang-jwt/jwt for much.
  • util package name is non-descriptive and does not tell me what it does. I'm going to link what I said not long ago https://www.reddit.com/r/golang/comments/134dwga/yet_another_realworld_implementation_go_kit/jihv0qg/ and https://go.dev/doc/effective_go#package-names
  • Related to above, you did a if strings.Contains(err.Error(), "UNIQUE constraint failed") which is strange. It looks like it's specific only to modernc library. What will happen when a user tests against a different database?
  • why not latest postgres version 15 in docker-compose file instead of 13
  • try to use context from the request. For example
 res, err := opaQuery.Eval(c.Request.Context(), rego.EvalInput(input))
 // instead of 
 res, err := opaQuery.Eval(context.TODO(), rego.EvalInput(input))
  • For testing, consider table-driven tests so that you can test multiple scenarios/use cases against a function. https://dave.cheney.net/2019/05/07/prefer-table-driven-tests
  • to take advantage of docker caching, copy both go.mod and go.sum first, then run go mod download. Afterwards, copy the rest of the file. You'll get faster build thanks to caching. This is observable when you make a change in codebase and rebuild your image.
  • Also consider running your app as non-root in Dockerfile.
  • personal preference since you already statically-compile the app, you can use scratch or distroless image which is even smaller. Also, I try to avoid anything with alpine image https://martinheinz.dev/blog/92
  • In readme, you can run docker compose up -d as daemon mode.
  • A nitpick but your persistent volume claim file name for database is pvp.yaml. I assume it'd be pvc.yaml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.