refactoring some comments

This commit is contained in:
VetheonGames 2024-03-28 00:56:45 -06:00
parent f9a5542ca2
commit 2e7506f0b7

View File

@ -54,7 +54,7 @@ func GenerateCertForDomain(domain string) {
certManager := autocert.Manager{
Prompt: autocert.AcceptTOS,
Cache: autocert.DirCache("certs"), // Stores certificates in ./certs
HostPolicy: autocert.HostWhitelist(domain), // Replace with your domain
HostPolicy: autocert.HostWhitelist(domain),
}
server := &http.Server{
@ -126,7 +126,6 @@ func SendCommandToNode(nodeAddress, action, nodeName, value string) {
}
defer resp.Body.Close()
// Optionally, read the response body
// Note: As of Go 1.16, ioutil.ReadAll is deprecated. Use io.ReadAll instead.
responseBody, err := io.ReadAll(resp.Body)
if err != nil {
@ -166,7 +165,7 @@ func HandleCommand(w http.ResponseWriter, r *http.Request) {
return
}
// Example: Extracting command from the request body
// Extracting command from the request body
// You'll need to define the structure of your request body
var req struct {
NodeAddress string `json:"nodeAddress"`