basic html structure jasfljdsafksdkfsdafjadlfkjsakfd

This commit is contained in:
KZacharski 2023-08-18 10:39:29 +02:00
parent 7452c4f1a7
commit 88413e616e
3 changed files with 17 additions and 1 deletions

2
.diji-config/config.txt Normal file
View File

@ -0,0 +1,2 @@
// Quick mode skips all the questions besides project name and always uses the default option.
quick-mode = true

BIN
.diji-config/defaultfav.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

16
diji.go
View File

@ -4,6 +4,7 @@ import (
"fmt"
"log"
"os"
"strings"
)
func check(e error) {
@ -28,8 +29,21 @@ func main() {
if err != nil {
log.Fatal(err)
}
_, err2 := index.WriteString("test")
var indexcontent string = `<!DOCTYPE html>
<html>
<head>
<title>` + projname + `</title>
</head>
<html>`
_, err2 := index.WriteString(indexcontent)
check(err2)
defer index.Close()
fmt.Println(indname + " created.")
configbytes, err := os.ReadFile(".diji-config/config.txt")
if err != nil {
fmt.Print(err)
}
configtext := string(configbytes)
var quickmode bool = strings.Contains(configtext, "quick-mode = true")
fmt.Println(quickmode)
}