activity icon indicating copy to clipboard operation
activity copied to clipboard

Docs don't specify package name for some types

Open Sigafoos opened this issue 4 years ago • 1 comments

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

Sigafoos avatar Jul 11 '20 21:07 Sigafoos

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

cjslep avatar Jul 15 '20 20:07 cjslep