net/http extension to exchange structs

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • optic

    A simplified, generic, entity based web library for golang that's drop in compatible with net/http (by nanvenomous)

  • I did a version bump, here are the changes: - refined the the error handling - tried a few things, settled on an interface for the status code & a generic type for the error body. These seem to play really well together for the moment - You now need to provide the error type as well as the errors you want to send during encoding & decoding failures in order to even use the library. - This makes the initial configuration a little more cumbersome, but increases the transparency & still makes it quite simple and fun to define Mirrors (optic service routes) - rename Exception to HttpError - Would love any more feedback if this improves some of the initial qualms. - successfully remove S & R generics from Glance (still unsure if this is possible for Mirror) - began removing some unused code & un-exporting non-essentials. I believe this might be futile until I can scope all possible breaking changes

  • gio

    Mirror of the Gio main repository (https://git.sr.ht/~eliasnaur/gio)

  • I've been writing a WASM app using gio & I found myself wanting for a simplified web library. In addition I drew some inspiration from leptos server functions. A friend of mine mentioned it has some similarities with next.js

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • revive

    🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint

  • I would suggest checking out something like revive to improve the code. For instance you use an errors.New(fmt.Sprintf(... when you can just use fmt.Errorf(... to simplify it. I am not saying obey everything but there are some good lints included that can even catch bugs (for instance misusing errors.Is or errors.As or general equality).

  • wasm-fetch

    Web Assembly fetch wrapper that avoids importing net/http.

  • I have a plan to add wasm fetch as a dependency under a build tag only for js builds using the appropriate build tags. Hadn't thought further than that. Any examples of a websocket implementation you could provide? I think I need to figure out this error handling portion first.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts