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

Method SetNillableDownloads

ent/share_update.go:109–114  ·  view source on GitHub ↗

SetNillableDownloads sets the "downloads" field if the given value is not nil.

(i *int)

Source from the content-addressed store, hash-verified

107
108// SetNillableDownloads sets the "downloads" field if the given value is not nil.
109func (su *ShareUpdate) SetNillableDownloads(i *int) *ShareUpdate {
110 if i != nil {
111 su.SetDownloads(*i)
112 }
113 return su
114}
115
116// AddDownloads adds i to the "downloads" field.
117func (su *ShareUpdate) AddDownloads(i int) *ShareUpdate {

Callers

nothing calls this directly

Calls 1

SetDownloadsMethod · 0.95

Tested by

no test coverage detected