olivia: github.com/olivia-ai/olivia/util Index | Files

package util

import "github.com/olivia-ai/olivia/util"


Package Files

file.go messages.go slice.go

func Contains Uses

func Contains(slice []string, text string) bool

func GetMessage Uses

func GetMessage(tag string) string

GetMessage retrieves a message tag and returns a random message chose from res/messages.json

func Index Uses

func Index(slice []string, text string) int

func ReadFile Uses

func ReadFile(path string) (bytes []byte)

type Message Uses

type Message struct {
    Tag      string   `json:"tag"`
    Messages []string `json:"messages"`

func SerializeMessages Uses

func SerializeMessages() (messages []Message)

Package util imports 4 packages (graph) and is imported by 5 packages. Updated 2019-08-09. Refresh now. Tools for package owners.