github.com/onflow/flow-go@v0.33.17/model/flow/mapfunc/identity.go (about)

     1  package mapfunc
     2  
     3  import (
     4  	"github.com/onflow/flow-go/model/flow"
     5  )
     6  
     7  func WithWeight(weight uint64) flow.IdentityMapFunc {
     8  	return func(identity flow.Identity) flow.Identity {
     9  		identity.Weight = weight
    10  		return identity
    11  	}
    12  }