Skip to content

Plankiton/SexPistol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6bed59c · Nov 7, 2021
Nov 7, 2021
Apr 26, 2021
Sep 23, 2021
Sep 23, 2021
Sep 7, 2021
Aug 23, 2021
Mar 28, 2021
Jun 7, 2021
Oct 14, 2021
Oct 14, 2021
Sep 21, 2021
Sep 21, 2021
Sep 23, 2021
Sep 23, 2021
Sep 23, 2021
Sep 23, 2021
Aug 30, 2021
Aug 30, 2021
Sep 23, 2021
Sep 8, 2021

Repository files navigation

Sex Pistol Icon

Sex Pistol

CodeQL


A Sex web micro framework for GoLang.

Get Started


Install

It is easy, just take that command on your favorite terminal:

$ go get github.com/Plankiton/SexPistol

First Code

Its so easy like that:

package main
import "github.com/Plankiton/SexPistol"
func main() {
    Sex.NewPistol().
    Add("/{name}", func (r Sex.Request) string {
        return Sex.Fmt("Hello, %s", r.PathVars["name"])
    }).
    Run()
}

Too sex no? That code make the same thing what the code above:

Code using default library from Go

package main
import (
    "net/http"
    "fmt"
    "strings"
)

func main() {
    http.HandleFunc("/",func Hello (w http.ResponseWriter, r *http.Request) {
        path := strings.Split(r.URL.Path, "/")

        w.WriteHeader(200)
        w.Write([]byte(fmt.Sprintf(
            "Hello, %s", path[len(path)-1],
        )))
    })

    http.ListenAndServe(":8000", nil)
}

About

A sex micro framework for create web applications on Go language

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published