Skip to content

coderianx/vingo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vingo

⚡️ What is Vingo?

Vingo is a modern template engine developed under the Flint Framework. it provides a fast, flexible, and clean way to render templates in Golang,with full entegration into Flint.


⚙️ Installation

go get github.com/coderianx/vingo

🚀 Quick Start

package main

import (
	"net/http"
    
    "github.com/coderianx/vingo"
)

func main() {
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		w.Header().Set("Content-Type", "text/html; charset=utf-8")

        tmpl, err := vingo.Render("index.html", map[string]interface{}{
            "title": "Welcome to Vingo",
            "message": "Hello, Vingo!",
        })
        if err != nil {
            http.Error(w, err.Error(), http.StatusInternalServerError)
            return
        }

		w.Write([]byte(html))
	})

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

Template Example (index.html)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><{ title }></title>
</head>
<body>
    <h1><{ message }></h1>
</body>
</html>

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Vingo — Simple, fast & flexible template engine for Go, Developed by Flint Framework⚡️

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages