1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00
documize/vendor/github.com/microsoft/go-mssqldb/msdsn/conn_str_go112.go
2024-01-10 14:47:40 -05:00

22 lines
367 B
Go

//go:build go1.12
// +build go1.12
package msdsn
import "crypto/tls"
func TLSVersionFromString(minTLSVersion string) uint16 {
switch minTLSVersion {
case "1.0":
return tls.VersionTLS10
case "1.1":
return tls.VersionTLS11
case "1.2":
return tls.VersionTLS12
case "1.3":
return tls.VersionTLS13
default:
// use the tls package default
}
return 0
}