convert interface{} to []interface{}

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

Our great sponsors
  • Appwrite - The open-source backend cloud platform
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • JSON-to-Go

    Translates JSON into a Go type in your browser instantly (original)

    Do your best to get static types on everything. Play a game with yourself where interface{} is banned and try to do your work. One of the most common sources of such loosely-typed values in JSON, so I'll point out this automatic struct generator for instance. If you have questions about a specific place you don't see how to avoid interface, feel free to ask. Every once in a while I do have to reach for something like this, but it should be rare.

  • go-clap

    Lightweight, non intrusive Command Line Argument Parser

    For some in depth examples on how to use reflection in Go and transform types into others, I would suggest you to have a look at clap, the Command Line Argument Parser, and more specifically this file.

  • Appwrite

    Appwrite - The open-source backend cloud platform. Add Auth, Databases, Functions, and Storage to your product and build any application at any scale while using your preferred coding languages and tools.

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