方法1:
1 | func (this *ResourcesCtl) ListResources(c *gin.Context) goft.Json{ |
其中GetGroupVersion函数是
1 | func (c *ResourcesCtl) GetGroupVersion(str string) (group,version string) { |
方法2:
用restmapper也可以
1 | import( |
这种也可以
方法1:
1 | func (this *ResourcesCtl) ListResources(c *gin.Context) goft.Json{ |
其中GetGroupVersion函数是
1 | func (c *ResourcesCtl) GetGroupVersion(str string) (group,version string) { |
方法2:
用restmapper也可以
1 | import( |
这种也可以
原文作者:HAOJX
原文链接:haojianxun.github.io/2021/11/25/获取资源api-reasources/
发表日期:November 25th 2021, 12:00:00 am
更新日期:October 14th 2022, 12:14:26 am
版权声明:本文采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: true
tags: true