github.com/koko1123/flow-go-1@v0.29.6/model/flow/mapfunc/identity.go (about)

     1  package mapfunc
     2  
     3  import (
     4  	"github.com/koko1123/flow-go-1/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  }