You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: go.go
    path of file: ./repos/plumber/vendor/nhooyr.io/websocket/internal/xsync
    
    the code of the file until where you have to start completion: package xsync

import (
	"fmt"
)

// Go allows running a function in another goroutine
// and waiting for its error.
func Go(fn func() error) <-chan error {
	errs := make(chan error, 1)
	go func() {
		defer func() {
			r := r
    
func Go(fn func() error) <-chan error {
	errs := make(chan error, 1)
	go func() {
		defer func() {
			r := recover()
			if r != nil {
				select {
				case errs <- fmt.Errorf("panic in go fn: %v", r):
				default:
				}
			}
		}()
		errs <- fn()
	}()

	return errs
}