MCPcopy Create free account
hub / github.com/larksuite/cli / dryRunTableCreateBody

Function dryRunTableCreateBody

shortcuts/base/table_ops.go:157–169  ·  view source on GitHub ↗
(runtime *common.RuntimeContext, tableName string)

Source from the content-addressed store, hash-verified

155}
156
157func dryRunTableCreateBody(runtime *common.RuntimeContext, tableName string) map[string]interface{} {
158 body := map[string]interface{}{"name": tableName}
159 if strings.TrimSpace(runtime.Str("fields")) == "" {
160 return body
161 }
162 fieldItems, err := parseJSONArray(newParseCtx(runtime), runtime.Str("fields"), "fields")
163 if err != nil {
164 body["fields"] = "<invalid_fields_json>"
165 return body
166 }
167 body["fields"] = fieldItems
168 return body
169}
170
171func listEveryField(runtime *common.RuntimeContext, baseToken, tableID string) ([]map[string]interface{}, error) {
172 const pageLimit = 100

Callers 2

dryRunBaseCreateFunction · 0.85
dryRunTableCreateFunction · 0.85

Calls 3

parseJSONArrayFunction · 0.85
newParseCtxFunction · 0.85
StrMethod · 0.65

Tested by

no test coverage detected