MCPcopy Index your code
hub / github.com/google/go-github / runDelete

Function runDelete

example/auditlogstream/main.go:144–157  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

142}
143
144func runDelete(args []string) {
145 fs, enterprise := newFlagSet("delete")
146 streamID := fs.Int64("stream-id", 0, "ID of the audit log stream to delete (required).")
147
148 ctx, client, ent := parseAndInit(fs, enterprise, args)
149 requireIntFlag("stream-id", *streamID)
150
151 _, err := client.Enterprise.DeleteAuditLogStream(ctx, ent, *streamID)
152 if err != nil {
153 log.Fatalf("Error deleting audit log stream: %v", err)
154 }
155
156 fmt.Printf("Successfully deleted audit log stream %v.\n", *streamID)
157}
158
159func newClient(token, apiURL string) *github.Client {
160 client, err := github.NewClient(github.WithAuthToken(token), github.WithEnterpriseURLs(apiURL, apiURL))

Callers 1

mainFunction · 0.85

Calls 4

newFlagSetFunction · 0.85
parseAndInitFunction · 0.85
requireIntFlagFunction · 0.85
DeleteAuditLogStreamMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…