These are chat archives for gin-gonic/gin

Nov 2017
Nov 01 2017 22:38
pretty general go question here, but with gin-gonic intentions
can I declare a variable with a type given in a parameter?
func HandleStuff(dataType TypeOrSomethingDunno) {
    var data []dataType // declare a variable which is a slice of the passed type

    // append stuff to data and do other things