Help us shape the future of Go! Take the 2026 Go Developer Survey

feedback

package
v0.150.0-rc.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package feedback reads the person's replies to the scheduled status reports in Slack: where a report was posted (its slack_send_message result), the replies in its thread (the Slack MCP server's slack_read_thread text) and whom a reply is for.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Later

func Later(a, b string) bool

Later reports whether Slack ts a is after b; an empty b is before all.

func Route

func Route(text string, names []string) (to, msg string)

Route is whom a reply is for: the agent among names its text opens with, "<name>: <message>" (the longest, without regard to case), with the rest; none, "" and the whole text.

Types

type Message

type Message struct {
	// User is the author's Slack user id.
	User string
	TS   string
	Text string
}

Message is one message of a thread.

type Post

type Post struct {
	Channel string
	TS      string
}

Post is where a message was posted: its channel and ts.

func ParsePost

func ParsePost(result string) (Post, error)

ParsePost reads a slack_send_message result: its message_context.

type Thread

type Thread struct {
	Parent  Message
	Replies []Message
}

Thread is a thread's parent and its replies, oldest first.

func ParseThread

func ParseThread(result string) (Thread, error)

ParseThread reads slack_read_thread's result: a JSON object whose messages are the thread as text, the parent first, each message a header, From, Time and Message TS lines, then its text.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL