cmd/eksterd/micropub.go
Method micropubHandler.ServeHTTP
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (h *micropubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
defer func() {
err := r.Body.Close()
if err != nil {
log.Printf("could not close request body: %v", err)
- Create a ticketCreate a ticket
Function parseIncomingItem
has 7 return statements (exceeds 4 allowed). Open
Open
func parseIncomingItem(r *http.Request) (*microsub.Item, error) {
contentType := r.Header.Get("content-type")
if contentType == "application/jf2+json" {
var item microsub.Item
- Create a ticketCreate a ticket
Method micropubHandler.ServeHTTP
has 6 return statements (exceeds 4 allowed). Open
Open
func (h *micropubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
defer func() {
err := r.Body.Close()
if err != nil {
log.Printf("could not close request body: %v", err)
- Create a ticketCreate a ticket
Function getChannelFromAuthorization
has 5 return statements (exceeds 4 allowed). Open
Open
func getChannelFromAuthorization(r *http.Request, conn redis.Conn) (string, error) {
// backward compatible
sourceID := r.URL.Query().Get("source_id")
if sourceID != "" {
channel, err := redis.String(conn.Do("HGET", "sources", sourceID))
- Create a ticketCreate a ticket
TODO found Open
Open
// TODO: improve handling of form-urlencoded
- Create a ticketCreate a ticket
- Exclude checks
TODO found Open
Open
// TODO: We could try to fill the Source of the Item with something, but what?
- Create a ticketCreate a ticket
- Exclude checks