https://github.com/nikitaksv/gendata
Template Data Generator - JSON To GoLang, PHP and other
https://github.com/nikitaksv/gendata
codegenerator datagen generator golang jsoncafe jsongen php template
Last synced: 3 months ago
JSON representation
Template Data Generator - JSON To GoLang, PHP and other
- Host: GitHub
- URL: https://github.com/nikitaksv/gendata
- Owner: nikitaksv
- License: apache-2.0
- Created: 2021-01-22T14:54:57.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-09-20T17:52:47.000Z (over 2 years ago)
- Last Synced: 2026-01-15T00:41:21.659Z (5 months ago)
- Topics: codegenerator, datagen, generator, golang, jsoncafe, jsongen, php, template
- Language: Go
- Homepage:
- Size: 184 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GenData
[](http://godoc.org/github.com/nikitaksv/gendata)


[](https://codecov.io/gh/nikitaksv/gendata)

---
Template Data Generator
## Wiki
[Doc](https://github.com/nikitaksv/gendata/wiki)
[Syntax](https://github.com/nikitaksv/gendata/wiki/Syntax)
[Examples](https://github.com/nikitaksv/gendata/wiki/Examples)
## Installation
Follow those steps to install the library:
1. Import the library our code:
```shell
go get github.com/nikitaksv/gendata
```
or install cli tool
```shell
go install github.com/nikitaksv/gendata
```
## Usage
### CLI
```shell
gendata gen -l go -t testdata/template.txt -d testdata/data.json -o testdata/
```
### Code example PHP Class generator from JSON data:
```go
package main
import (
"bytes"
"context"
"fmt"
"log"
gendata "github.com/nikitaksv/gendata/pkg/service"
)
func main() {
tmpl := []byte(`