Is there a way to use one function using a generic parameter instead of having two functions as shown below? I have Java background and looking for a way to have something like this
//Java
public Something doSomething(T val)
//Go
func (l *myclass) DoSomethingString(value string) error {
test := []byte[value]
// do something with test
return err
}
func (l *myclass) DoSomethingInt(value int64) error {
test := []byte[value]
// do something with test
return err
}