MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / SetNillableWeight

Method SetNillableWeight

ent/node_update.go:535–540  ·  view source on GitHub ↗

SetNillableWeight sets the "weight" field if the given value is not nil.

(i *int)

Source from the content-addressed store, hash-verified

533
534// SetNillableWeight sets the "weight" field if the given value is not nil.
535func (nuo *NodeUpdateOne) SetNillableWeight(i *int) *NodeUpdateOne {
536 if i != nil {
537 nuo.SetWeight(*i)
538 }
539 return nuo
540}
541
542// AddWeight adds i to the "weight" field.
543func (nuo *NodeUpdateOne) AddWeight(i int) *NodeUpdateOne {

Callers

nothing calls this directly

Calls 1

SetWeightMethod · 0.95

Tested by

no test coverage detected