forked from TrueCloudLab/frostfs-api-go
[#388] *: Remove nil check from setters
I knew one day `sed` would save me an hour of manual work: ``` sed -i -n -e ' s/) Set/) Set/ p t setter b end :setter n s/nil/nil/ t hasif p b end :hasif n :loop p n s/}/}/ t end b loop :end ' $@ goimports -w $@ ``` Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
50162741ac
commit
732dd51b1b
32 changed files with 714 additions and 2104 deletions
|
@ -6,98 +6,70 @@ import (
|
|||
|
||||
// SetVersion is a Version field setter.
|
||||
func (x *DataAuditResult) SetVersion(v *refs.Version) {
|
||||
if x != nil {
|
||||
x.Version = v
|
||||
}
|
||||
x.Version = v
|
||||
}
|
||||
|
||||
// SetAuditEpoch is an AuditEpoch field setter.
|
||||
func (x *DataAuditResult) SetAuditEpoch(v uint64) {
|
||||
if x != nil {
|
||||
x.AuditEpoch = v
|
||||
}
|
||||
x.AuditEpoch = v
|
||||
}
|
||||
|
||||
// SetContainerId is a ContainerId field setter.
|
||||
func (x *DataAuditResult) SetContainerId(v *refs.ContainerID) {
|
||||
if x != nil {
|
||||
x.ContainerId = v
|
||||
}
|
||||
x.ContainerId = v
|
||||
}
|
||||
|
||||
// SetPublicKey is a PublicKey field setter.
|
||||
func (x *DataAuditResult) SetPublicKey(v []byte) {
|
||||
if x != nil {
|
||||
x.PublicKey = v
|
||||
}
|
||||
x.PublicKey = v
|
||||
}
|
||||
|
||||
// SetComplete is a Complete field setter.
|
||||
func (x *DataAuditResult) SetComplete(v bool) {
|
||||
if x != nil {
|
||||
x.Complete = v
|
||||
}
|
||||
x.Complete = v
|
||||
}
|
||||
|
||||
// SetRequests is a Requests field setter.
|
||||
func (x *DataAuditResult) SetRequests(v uint32) {
|
||||
if x != nil {
|
||||
x.Requests = v
|
||||
}
|
||||
x.Requests = v
|
||||
}
|
||||
|
||||
// SetRetries is a Retries field setter.
|
||||
func (x *DataAuditResult) SetRetries(v uint32) {
|
||||
if x != nil {
|
||||
x.Retries = v
|
||||
}
|
||||
x.Retries = v
|
||||
}
|
||||
|
||||
// SetPassSg is a PassSg field setter.
|
||||
func (x *DataAuditResult) SetPassSg(v []*refs.ObjectID) {
|
||||
if x != nil {
|
||||
x.PassSg = v
|
||||
}
|
||||
x.PassSg = v
|
||||
}
|
||||
|
||||
// SetFailSg is a FailSg field setter.
|
||||
func (x *DataAuditResult) SetFailSg(v []*refs.ObjectID) {
|
||||
if x != nil {
|
||||
x.FailSg = v
|
||||
}
|
||||
x.FailSg = v
|
||||
}
|
||||
|
||||
// SetHit is a Hit field setter.
|
||||
func (x *DataAuditResult) SetHit(v uint32) {
|
||||
if x != nil {
|
||||
x.Hit = v
|
||||
}
|
||||
x.Hit = v
|
||||
}
|
||||
|
||||
// SetMiss is a Miss field setter.
|
||||
func (x *DataAuditResult) SetMiss(v uint32) {
|
||||
if x != nil {
|
||||
x.Miss = v
|
||||
}
|
||||
x.Miss = v
|
||||
}
|
||||
|
||||
// SetFail is a Fail field setter.
|
||||
func (x *DataAuditResult) SetFail(v uint32) {
|
||||
if x != nil {
|
||||
x.Fail = v
|
||||
}
|
||||
x.Fail = v
|
||||
}
|
||||
|
||||
// SetPassNodes is a PassNodes field setter.
|
||||
func (x *DataAuditResult) SetPassNodes(v [][]byte) {
|
||||
if x != nil {
|
||||
x.PassNodes = v
|
||||
}
|
||||
x.PassNodes = v
|
||||
}
|
||||
|
||||
// SetFailNodes is a FailNodes field setter.
|
||||
func (x *DataAuditResult) SetFailNodes(v [][]byte) {
|
||||
if x != nil {
|
||||
x.FailNodes = v
|
||||
}
|
||||
x.FailNodes = v
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue