Golang net/http.Server.ListenAndServeTLS() function example
package net/http
Golang net/http.Server.ListenAndServeTLS() function usage example
Code modified from https://www.socketloop.com/references/golang-net-http-server-listenandserve-function-and-server-type-example
TLSServer := &http.Server{Handler: mux}
TLSServer.Addr = "hostname:443"
err := TLSServer.ListenAndServeTLS("server.pem", "server.key")
See also : https://www.socketloop.com/references/golang-crypto-tls-listen-and-newlistener-functions-example
References :
See also : Golang net/http.Server.ListenAndServe() function and Server type example
Advertisement
Something interesting
Tutorials
+21.1k Golang : Sort and reverse sort a slice of strings
+5.7k Golang : Struct field tags and what is their purpose?
+29.7k Golang : Record voice(audio) from microphone to .WAV file
+23.9k Golang : Fix type interface{} has no field or no methods and type assertions example
+11.6k SSL : The certificate is not trusted because no issuer chain was provided
+22.8k Golang : untar or extract tar ball archive example
+8.2k Prevent Write failed: Broken pipe problem during ssh session with screen command
+10.8k PHP : Convert(cast) bigInt to string
+10.1k Golang : Test a slice of integers for odd and even numbers
+9.3k Golang : Temperatures conversion example
+46.2k Golang : Read tab delimited file with encoding/csv package
+6.9k Golang : How to setup a disk space used monitoring service with Telegram bot