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

Method Prefix

module/router/iml.go:365–377  ·  view source on GitHub ↗
(ctx context.Context, serviceId string)

Source from the content-addressed store, hash-verified

363}
364
365func (i *imlRouterModule) Prefix(ctx context.Context, serviceId string) (string, error) {
366 pInfo, err := i.serviceService.Check(ctx, serviceId, asServer)
367 if err != nil {
368 return "", err
369 }
370
371 if pInfo.Prefix != "" {
372 if pInfo.Prefix[0] != '/' {
373 pInfo.Prefix = fmt.Sprintf("/%s", strings.TrimSuffix(pInfo.Prefix, "/"))
374 }
375 }
376 return strings.TrimSuffix(pInfo.Prefix, "/"), nil
377}

Callers

nothing calls this directly

Calls 1

CheckMethod · 0.65

Tested by

no test coverage detected