MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / WriteModeFromString

Function WriteModeFromString

cli/internal/specs/v0/write_mode.go:57–64  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

55}
56
57func WriteModeFromString(s string) (WriteMode, error) {
58 for m, str := range AllWriteModes {
59 if s == str {
60 return WriteMode(m), nil
61 }
62 }
63 return WriteModeOverwriteDeleteStale, fmt.Errorf("invalid write mode: %s", s)
64}

Callers 3

UnmarshalJSONMethod · 0.85
TestWriteModeFromStringFunction · 0.85
TestWriteModeRoundTripFunction · 0.85

Calls 2

WriteModeTypeAlias · 0.85
ErrorfMethod · 0.80

Tested by 2

TestWriteModeFromStringFunction · 0.68
TestWriteModeRoundTripFunction · 0.68