Yes, it is possible. However, in your program
go somefunc(&X)
fmt.Printf("%v", X)
there is no guarantee that X.test will be modified before the fmt.Println(). It might happen before, it might happen afterwards and even worse, it might happen concurrently. In the last case, you might even read something completely different... Neither 0 nor 20.
So, you need to wait for the goroutine. You can either use a channel to signal when you are done, or you can use sync.WaitGroup for that. (There are also several other alternatives, like using a Mutex or atomic loads and stores, but Channels and/or WaitGroups are probably the easiest).