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

Method SetNillableWeight

ent/node_update.go:168–173  ·  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

166
167// SetNillableWeight sets the "weight" field if the given value is not nil.
168func (nu *NodeUpdate) SetNillableWeight(i *int) *NodeUpdate {
169 if i != nil {
170 nu.SetWeight(*i)
171 }
172 return nu
173}
174
175// AddWeight adds i to the "weight" field.
176func (nu *NodeUpdate) AddWeight(i int) *NodeUpdate {

Callers

nothing calls this directly

Calls 1

SetWeightMethod · 0.95

Tested by

no test coverage detected