code: func Closer(kites interface{}) io.Closer {
  	switch k := kites.(type) {
  	case *Kite:
  		return closerFunc(func() []error {
  			k.Close()
  			return nil
  		})
  	case []*Kite:
  		return closerFunc(func() []error {
  			for _, k := range k {
  				k.Close()
  			}
  			return nil
  		})
  	case *Client:
  		return closerFunc(func() []error {
  			k.Close()
  			return nil
  		})
  	case []*Client:
  		return closerFunc(func() []error {
  			for _, c := range k {
  				c.Close()
  			}
  			return nil
  		})
  	default:
  		panic(fmt.Errorf("unrecognized type passed to Close %T", kites))
  	}
  }
docs: // Closer returns a io.Closer that can be used to close all the kites
  // given by the generic argument.
  //
  // The kites is expected to be one of:
  //
  //   - *kite.Kite
  //   - []*kite.Kite
  //   - *kite.Client
  //   - []*kite.Client
  //
  // If the kites argument is a slice and at least one of the kites returns
  // error on Close, the Close method returns *ErrClose.
  //
  // TODO(rjeczalik): Currently (*Kite).Close and (*Client).Close does
  // not implement io.Closer interface - when [0] is resolved, this
  // method should be adopted accordingly.
  //
  //   [0] - https://github.com/koding/kite/issues/183
  //