Improve code documentation

This commit is contained in:
TwinProduction committed 2020-10-23 15:58:59 -04:00
1 parent c09cd9df7e
commit 1bde98868e
5 files changed
+24 -4

No files matched your search

+2
View File
@@ -12,6 +12,7 @@ var (
insecureHttpClient *http.Client
)
// GetHttpClient returns the shared HTTP client
func GetHttpClient(insecure bool) *http.Client {
if insecure {
if insecureHttpClient == nil {
@@ -35,6 +36,7 @@ func GetHttpClient(insecure bool) *http.Client {
}
}
// CanCreateConnectionToTcpService checks whether a connection can be established with a TCP service
func CanCreateConnectionToTcpService(address string) bool {
conn, err := net.DialTimeout("tcp", address, 5*time.Second)
if err != nil {