Implement web-server
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user