MCPcopy Create free account
hub / github.com/github/gh-aw / deleteDefaultsVariable

Function deleteDefaultsVariable

pkg/cli/env_command.go:552–558  ·  view source on GitHub ↗
(target defaultsTarget, name string)

Source from the content-addressed store, hash-verified

550}
551
552func deleteDefaultsVariable(target defaultsTarget, name string) error {
553 out, err := runDefaultsGH("api", "-X", "DELETE", target.variableEndpoint(name))
554 if err != nil && !isDefaultsNotFoundError(err, out) {
555 return fmt.Errorf("failed to delete %s: %w", name, errWithOutput(err, out))
556 }
557 return nil
558}
559
560func isDefaultsNotFoundError(err error, out []byte) bool {
561 if err == nil {

Callers 1

defaultsUpdateFromFileFunction · 0.85

Calls 5

runDefaultsGHFunction · 0.85
isDefaultsNotFoundErrorFunction · 0.85
errWithOutputFunction · 0.85
variableEndpointMethod · 0.80
ErrorfMethod · 0.45

Tested by

no test coverage detected