MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / printAccesses

Function printAccesses

resources/access/access_test.go:42–60  ·  view source on GitHub ↗
(group string, builder *strings.Builder)

Source from the content-addressed store, hash-verified

40}
41
42func printAccesses(group string, builder *strings.Builder) {
43 handler, has := access.GetPermit(group)
44 if has {
45 keys := handler.AccessKeys()
46 sort.Strings(keys)
47 builder.WriteString(fmt.Sprintf("%s:\n", group))
48 for _, key := range keys {
49 apis, err := handler.GetPermits(key)
50 if err != nil {
51 continue
52 }
53 builder.WriteString(fmt.Sprintf(" %s:\n", key))
54 for _, api := range apis {
55 builder.WriteString(fmt.Sprintf(" - %s\n", api))
56 }
57 }
58 }
59 return
60}
61
62func TestPrintName(t *testing.T) {
63 result := make(map[string]string)

Callers 1

TestPrintlnAccessAPIsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected