init
This commit is contained in:
commit
760582df35
3 changed files with 39 additions and 0 deletions
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# json commented, sister kissed.
|
||||||
|
jsonc is bloat. who the fuck needs inline comments? it adds unnecessary complications.
|
||||||
|
say hello to JCSK. simple as fuck. 30 lines of code, can probably be shorter if ya wanna
|
3
go.mod
Normal file
3
go.mod
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module git.incest.world/sisterkissers/jcsk
|
||||||
|
|
||||||
|
go 1.23.2
|
33
main.go
Normal file
33
main.go
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
jsoninput := ""
|
||||||
|
output := []string{}
|
||||||
|
info, _ := os.Stdin.Stat()
|
||||||
|
if info.Mode()&os.ModeCharDevice == 0 {
|
||||||
|
guh, _ := io.ReadAll(os.Stdin)
|
||||||
|
jsoninput = string(guh)
|
||||||
|
print(jsoninput)
|
||||||
|
} else if len(os.Args) > 1 {
|
||||||
|
penis, err := os.ReadFile(os.Args[1])
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("something something readfile failed")
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
jsoninput = string(penis)
|
||||||
|
}
|
||||||
|
for _, i := range strings.Split(jsoninput, "\n") {
|
||||||
|
if strings.HasPrefix(strings.TrimSpace(i), "//") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
output = append(output, i)
|
||||||
|
}
|
||||||
|
fmt.Println(strings.Join(output, "\n"))
|
||||||
|
}
|
Loading…
Reference in a new issue