Como usar literais de string de scanner personalizados Golang e expandir a memória para carregar o arquivo inteiro na memória?

Eu tenho tentado descobrir como implementar o que eu originalmente pensei que seria um programa simples. Eu tenho um arquivo de texto com cotações separadas por "$"

Quero que o programa analise o arquivo de cotação e selecione aleatoriamente 3 aspas para exibir e saída padrão.

Existem 1022 aspas no arquivo.

Quando tento dividir o arquivo, recebo este erro: ausente '

Não consigo descobrir como atribuir $ com uma string literal, continuo recebendo:
ausência de '

Este é o scanner personalizado:

onDollarSign := func(data []byte, atEOF bool) (advance int, token []byte, err error) {  
    for i := 0; i < len(data); i++ { 
        //if data[i] == "$$" {              # this is what I did originally
        //if data[i:i+2] == "$$" {    # (mismatched types []byte and string)
        //if data[i:i+2] == `$$` {    # throws (mismatched types []byte and string)
        // below throws syntax error: unexpected $ AND missing '
        if data[1:i+2] == '$$' {   
            return i + 1, data[:i], nil  
        }  
    }  

A string literal funciona bem se eu usar apenas uma$.

Por algum motivoapenas 71 cotações são carregadas na fatia de cotações.&nbsp;Não tenho certeza de como expandir. Para permitir que todas as 1022 citações sejam armazenadas na memória.

Eu estou tendo um tempo muito difícil tentando descobrir como fazer isso. é isso que eu tenho agora:

package main
import (  
    "bufio"  
    "fmt"  
    "log"  
    "math/rand"  
    "os"  
    "time"  
)  

func main() {  
    rand.Seed(time.Now().UnixNano()) // Try changing this number!  
    quote_file, err := os.Open("/Users/bryan/Dropbox/quotes_file.txt")  
    if err != nil {  
        log.Fatal(err)  
    }  
    scanner := bufio.NewScanner(quote_file)  
    // define split function  
    onDollarSign := func(data []byte, atEOF bool) (advance int, token []byte, err error) {  
        for i := 0; i < len(data); i++ {  
            if data[i] == '$$' {  
                return i + 1, data[:i], nil  
            }  
        }  
        fmt.Print(data)  
        return 0, data, bufio.ErrFinalToken  
    }  
    scanner.Split(onDollarSign)  
    var quotes []string  

    // I think this will scan the file and append all the parsed quotes into quotes  
    for scanner.Scan() {  
        quotes = append(quotes, scanner.Text())  

    }  
    if err := scanner.Err(); err != nil {  
        fmt.Fprintln(os.Stderr, "reading input:", err)  
    }  
    fmt.Print(len(quotes))  
    fmt.Println("quote 1:", quotes[rand.Intn(len(quotes))])  
    fmt.Println("quote 2:", quotes[rand.Intn(len(quotes))])  
    fmt.Println("quote 3:", quotes[rand.Intn(len(quotes))])  
}