NewFollowRelationship is a helper for creating a FollowRelationship from the source ("follower") and target ("following") feeds.
(source, target Feed, opts ...FollowRelationshipOption)
| 399 | // NewFollowRelationship is a helper for creating a FollowRelationship from the |
| 400 | // source ("follower") and target ("following") feeds. |
| 401 | func NewFollowRelationship(source, target Feed, opts ...FollowRelationshipOption) FollowRelationship { |
| 402 | r := FollowRelationship{ |
| 403 | Source: source.ID(), |
| 404 | Target: target.ID(), |
| 405 | } |
| 406 | for _, opt := range opts { |
| 407 | opt(&r) |
| 408 | } |
| 409 | return r |
| 410 | } |
| 411 | |
| 412 | // FollowRelationshipOption customizes a FollowRelationship. |
| 413 | type FollowRelationshipOption func(r *FollowRelationship) |