func handleAidText(ctx context.Context, input []byte, m richcontent.MatchIndices) (string, error) { req, ok := ctx.Value(CtxKeyArticleRequest).(*ArticleRequest) if !ok { log.Println("no ArticleRequest present") return "", nil // Silently fail } aidString := string(m.ByteSliceOf(input, 1)) return aidAndBrdnameToArticle(req.Brd.BrdName, aidString) }
func handleBoardAidText(ctx context.Context, input []byte, m richcontent.MatchIndices) (string, error) { brdname := string(m.ByteSliceOf(input, 1)) aidString := string(m.ByteSliceOf(input, 2)) return aidAndBrdnameToArticle(brdname, aidString) }