go-fed / activity

ActivityStreams & ActivityPub in golang, oh my!
BSD 3-Clause "New" or "Revised" License
710 stars 111 forks source link

Docs don't specify package name for some types #138

Open Sigafoos opened 4 years ago

Sigafoos commented 4 years ago

Please Describe The Problematic Behavior Copying the stubbed out code from the documentation (which is very helpful, by the way!) produces errors like these:

activitypub/activitypub.go:74:94: undefined: Activity
activitypub/activitypub.go:92:72: undefined: FederatingWrappedCallbacks
activitypub/activitypub.go:98:68: undefined: Activity
activitypub/activitypub.go:116:94: undefined: Activity

Please Describe The Expected Behavior The examples should be like this

func (*myService) PostInboxRequestBodyHook(c context.Context,
    r *http.Request,
    activity pub.Activity) (context.Context, error) {
    // TODO
    return nil, nil
}

Note pub.Activity instead of Activity

cjslep commented 4 years ago

Thanks! Also, it's OK to file the website issues here. But the site's repository is also available (and monitored) at: https://github.com/go-fed/site