jsonextend

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 4 Imported by: 0

README

go-jsonextend

Description

A simple Go json parser that support defining variables in json file.

Usage


package main

import (
    "fmt"
    "github.com/jaksonlin/go-jsonextend"
)

template:= `{"hello": "world", "name": "this is my ${name}", "age": ${age}}`
variables:= {"name": "jakson", "age": 18}

result, err:= jsonextend.Parse(template, variables)
if err != nil {
    fmt.Println(err)
}
fmt.Println(result)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(reader io.Reader, variables map[string]interface{}) (string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL