util/validation.go
func IsTLSCert(block string) bool {
	var cert tls.Certificate

	pemBlock := []byte(block)

	for {
		var derBlock *pem.Block
		derBlock, pemBlock = pem.Decode(pemBlock)
		if derBlock == nil {
			break
		}

		if derBlock.Type == certificate {
			cert.Certificate =
				append(cert.Certificate, derBlock.Bytes)
		}
	}

	if len(cert.Certificate) == 0 {
		return false
	}

	return true
}
func IsTLSCert(block string) bool {
	var cert tls.Certificate

	pemBlock := []byte(block)

	for {
		var derBlock *pem.Block
		derBlock, pemBlock = pem.Decode(pemBlock)
		if derBlock == nil {
			break
		}

		if derBlock.Type == certificate {
			cert.Certificate =
				append(cert.Certificate, derBlock.Bytes)
		}
	}

	if len(cert.Certificate) == 0 {
		return false
	}

	return true
}
func IsTLSCert ( block string ) bool { var cert tls . Certificate pemBlock := [ ] byte ( block ) for { var derBlock * pem . Block derBlock , pemBlock = pem . Decode ( pemBlock ) if derBlock == nil { break } if derBlock . Type == certificate { cert . Certificate = append ( cert . Certificate , derBlock . Bytes ) } } if len ( cert . Certificate ) == 0 { return false } return true }
// IsTLSCert if block is one or more
// TLS certificates then function returns true
IsTLSCert if block is one or more TLS certificates then function returns true