Skip to content

Instantly share code, notes, and snippets.

View SamuelTissot's full-sized avatar
💾
discovering

Samuel Tissot SamuelTissot

💾
discovering
  • Montreal
View GitHub Profile
@SamuelTissot
SamuelTissot / translate.go
Created January 9, 2020 02:25 — forked from hvoecking/translate.go
Golang reflection: traversing arbitrary structures
// Traverses an arbitrary struct and translates all stings it encounters
//
// I haven't seen an example for reflection traversing an arbitrary struct, so
// I want to share this with you. If you encounter any bugs or want to see
// another example please comment.
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Heye Vöcking
//