From 1e8f7d366267e83f3de35088c3291bb05ea3d749 Mon Sep 17 00:00:00 2001 From: stuzer05 Date: Thu, 14 Mar 2024 11:10:56 +0200 Subject: [PATCH] #10 Add Go JSON to struct tool (#11) Closes #10 Reviewed-on: https://gitea.stuzer.link/stuzer05/random-web-tools/pulls/11 Co-authored-by: stuzer05 Co-committed-by: stuzer05 --- src/components/Sidebar.vue | 3 + src/router/index.js | 9 + src/views/GoJSONToStruct.vue | 501 +++++++++++++++++++++++++++++++++++ 3 files changed, 513 insertions(+) create mode 100644 src/views/GoJSONToStruct.vue diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 3fa17e0..babf75e 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -42,6 +42,9 @@ export default { 'str_to_php_array': 'Str to PHP array', 'php_array_to_json': 'PHP array to Json', }, + 'GO': { + 'go_json_to_struct': 'JSON to Go struct', + }, 'JSON': { 'json_formatter': 'JSON formatter', }, diff --git a/src/router/index.js b/src/router/index.js index 838b29a..e3dbe3e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -75,6 +75,15 @@ const router = createRouter({ component: () => import('../views/JSONFormatter.vue'), }, + /** + * Golang + */ + { + path: '/go_json_to_struct', + name: 'go_json_to_struct', + component: () => import('../views/GoJSONToStruct.vue'), + }, + /** * SQL manipulation */ diff --git a/src/views/GoJSONToStruct.vue b/src/views/GoJSONToStruct.vue new file mode 100644 index 0000000..489c703 --- /dev/null +++ b/src/views/GoJSONToStruct.vue @@ -0,0 +1,501 @@ + + + + + \ No newline at end of file