code: func CreateCAExtension() (pkix.Extension, error) {
  	type basicConstraints struct {
  		IsCA       bool `asn1:"optional"`
  		MaxPathLen int  `asn1:"optional"`
  	}
  	basicCon := basicConstraints{IsCA: true, MaxPathLen: 0}
  	bitstr, err := asn1.Marshal(basicCon)
  	if err != nil {
  		return pkix.Extension{}, err
  	}
  
  	return pkix.Extension{
  		Id:       []int{2, 5, 29, 19}, // from x509 package
  		Critical: true,
  		Value:    bitstr,
  	}, nil
  }
docs: // CreateCAExtension creates a pkix.Extension for the x509 Basic Constraints
  // IsCA field ()