go-http-proxy

This is a project which is the result of a friend of mine asking for the following functionality:

"I want to proxy all external http request from my website, by prepending a url. This should all be secured with tokens to prevent abuse. Also caching would be nice."

Well, it is exactly that. Head over to Github to get it.

Basically it's just a gofiber Webserver which listens to requests and handles the caching. After that just plain builtin 'go/http' web requests. There is a bit of bonus functionality, such as configurability through cli arguments and custom user-agent support. Also you can set which headers are passed through ('Content-Type' is rather important). There are (at the point of writing this) working github-action scripts which automatically build the release binaries and create a Release on Github, which is super convenient. Especially for further development (if that ever happens). But I like to build my stuff future proof.

I do like the error handling of go much better, than e.g. in Javascript. You don't run into the "Pyramid of Doom" as often (for examples see Ruuve). Errors are handled in a (for me) much simpler to understand pattern:

value, err := doSomething(paramters)
    if err != nil {
        log.Fatal(err.Error())
    }
    name, err := somethingElse(value)
    if err != nil {
        name = "fallback"
        fmt.Println("Error" + err.Error())
    }
    fmt.Println("Username:" + name)