How to get UID in Golang of Answer source code?

Viewed 68

How to get UID (User ID) in Golang of Answer source code?

1 Answers
import "github.com/apache/incubator-answer/internal/base/middleware"

userID := middleware.GetLoginUserIDFromContext(ctx)