I believe what you are trying to accomplish, in the end, is something akin to the "Template method" design pattern:
In software engineering, the template method pattern is a behavioral
design pattern that defines the program skeleton of an algorithm in a
method, called template method, which defers some steps to subclasses.
https://en.wikipedia.org/wiki/Template_method_pattern
AFAIK, the only correct way to achieve something like this in Go is to use interfaces as @pie-o-pah and @icza have said. I say "something like", because you cannot define methods with interfaces as receivers (i.e. there is no such thing as partially abstract type in Go).
A correct implementation would look like this:
package main
import "fmt"
// --------------------------
// define your purely abstract type as an interface
type MyParent interface {
doSomething() string
}
// define a function (your template method) which operates
// on that interface; an interface cannot be a function receiver,
// but it can always be a parameter
func internal(m MyParent) string {
return m.doSomething()
}
// define the implementation
type MyChild struct {}
// implement the methods for the interface
func (m *MyChild) doSomething() string {
return "Test"
}
// in Go any type which implements all methods in a given interface
// implements that interface implicitly, but you can "force" the
// compiler to check that for you using the following trick
// (basically try to assign a an instance of the interface to a variable,
// then discard it)
var _ MyParent = (*MyChild)(nil)
// -------------------------------
// test code
func main() {
m := &MyChild{}
fmt.Println(m.doSomething())
fmt.Println(internal(m))
}