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: server_config.go
    path of file: ./repos/kubeedge/vendor/github.com/lucas-clemente/quic-go/internal/handshake
    
    the code of the file until where you have to start completion: package handshake

import (
	"bytes"
	"crypto/rand"

	"github.com/lucas-clemente/quic-go/internal/crypto"
)

// ServerConfig is a server config
type ServerConfig struct {
	kex             crypto.KeyExchange
	cer
    
func NewServerConfig(kex crypto.KeyExchange, certChain crypto.CertChain) (*ServerConfig, error) {
	id := make([]byte, 16)
	_, err := rand.Read(id)
	if err != nil {
		return nil, err
	}

	obit := make([]byte, 8)
	if _, err = rand.Read(obit); err != nil {
		return nil, err
	}

	cookieGenerator, err := NewCookieGenerator()

	if err != nil {
		return nil, err
	}

	return &ServerConfig{
		kex:             kex,
		certChain:       certChain,
		ID:              id,
		obit:            obit,
		cookieGenerator: cookieGenerator,
	}, nil
}