Implement web-server

This commit is contained in:
Fred Boniface
2023-09-01 21:51:30 +01:00
parent 0e1425c1b9
commit f1c8eb82b8
6 changed files with 118 additions and 0 deletions

View File

@@ -1 +1,23 @@
package strings
import "fmt"
type Encryption string
const (
WEP Encryption = "wep"
WPA Encryption = "wpa"
None Encryption = ""
)
type WiFi struct {
Ssid string
Password string
Hidden bool
Encryption Encryption
}
func FormatWiFi(input WiFi) string {
content := fmt.Sprintf("WIFI:T:%s;S:%s;P:%s;H:%t;", input.Encryption, input.Ssid, input.Password, input.Hidden)
return content
}