From 45518bd2859ca2221dbb1c43073d93ed9895b642 Mon Sep 17 00:00:00 2001 From: likfees Date: Mon, 1 Jan 2024 11:21:13 +0800 Subject: [PATCH] update mod --- go.mod | 10 ++++++++++ main.go | 11 +++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 go.mod diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5a3febf --- /dev/null +++ b/go.mod @@ -0,0 +1,10 @@ +module github/dalefeng/workflows-demo + +go 1.19 + +require github.com/json-iterator/go v1.1.12 + +require ( + github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect +) diff --git a/main.go b/main.go index d8fa929..3108d64 100644 --- a/main.go +++ b/main.go @@ -1,7 +1,14 @@ package main -import "fmt" +import ( + "fmt" + jsoniter "github.com/json-iterator/go" +) func main() { - fmt.Println("hello") + m := map[string]string{ + "hello": "world", + } + marshal, _ := jsoniter.Marshal(m) + fmt.Println(marshal) }