MCPcopy Index your code
hub / github.com/coder/coder / validateNonNegativeDecimalField

Function validateNonNegativeDecimalField

coderd/exp_chats.go:7449–7457  ·  view source on GitHub ↗
(name string, value *decimal.Decimal)

Source from the content-addressed store, hash-verified

7447}
7448
7449func validateNonNegativeDecimalField(name string, value *decimal.Decimal) error {
7450 if value == nil {
7451 return nil
7452 }
7453 if value.IsNegative() {
7454 return xerrors.Errorf("%s must be greater than or equal to zero", name)
7455 }
7456 return nil
7457}
7458
7459func unmarshalChatModelCallConfig(
7460 raw json.RawMessage,

Callers 1

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected