MCPcopy
hub / github.com/kopia/kopia / run

Method run

cli/command_user_info.go:26–40  ·  view source on GitHub ↗
(ctx context.Context, rep repo.Repository)

Source from the content-addressed store, hash-verified

24}
25
26func (c *commandServerUserInfo) run(ctx context.Context, rep repo.Repository) error {
27 up, err := user.GetUserProfile(ctx, rep, c.name)
28 if err != nil {
29 return errors.Wrap(err, "error getting user profile")
30 }
31
32 j, err := json.MarshalIndent(up, "", " ")
33 if err != nil {
34 return errors.Wrap(err, "error marshaling JSON")
35 }
36
37 c.out.printStdout("%s", j)
38
39 return nil
40}

Callers

nothing calls this directly

Calls 2

GetUserProfileFunction · 0.92
printStdoutMethod · 0.80

Tested by

no test coverage detected