command
module
Version:
v0.0.0-...-0059a22
Opens a new window with list of versions in this module.
Published: Jul 5, 2020
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Simple HTML generator with Golang
Generate a simple HTML from template.
Template file
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Code Practice with Golang</title>
</head>
<body>
<p>Hello {{.Name}}</p>
<p>Coupon: {{.Coupon}}</p>
<p>Amount: {{.Amount}}</p>
</body>
</html>
Result of generated file
index_gen.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Code Practice with Golang</title>
</head>
<body>
<p>Hello Quan Vu</p>
<p>Coupon: AIX1000</p>
<p>Amount: 5000</p>
</body>
</html>
Run it
go run main.go
Enjoy!
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.