MCPcopy Create free account
hub / github.com/GetStream/stream-go2 / NewFollowRelationship

Function NewFollowRelationship

types.go:401–410  ·  view source on GitHub ↗

NewFollowRelationship is a helper for creating a FollowRelationship from the source ("follower") and target ("following") feeds.

(source, target Feed, opts ...FollowRelationshipOption)

Source from the content-addressed store, hash-verified

399// NewFollowRelationship is a helper for creating a FollowRelationship from the
400// source ("follower") and target ("following") feeds.
401func 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.
413type FollowRelationshipOption func(r *FollowRelationship)

Callers

nothing calls this directly

Calls 1

IDMethod · 0.65

Tested by

no test coverage detected