Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

823 B
Raw Blame
package email_test

import (
	"fmt"

	"github.com/NandhaKishorM/laya/laya-go/email"
)

func ExampleCleanBody() {
	body := "Please refund the duplicate charge.\n\n" +
		"Atenciosamente,\nAna\n\n" +
		"Em seg., 5 de jan. de 2026, Bruno <[email protected]> escreveu:\n> the quoted request"
	fmt.Printf("%q\n", email.CleanBody(body, email.DefaultMaxChars))
	// Output: "Please refund the duplicate charge."
}

func ExampleState() {
	state, err := email.State("  Refund request ", "I was charged twice.\n\nSent from my iPhone",
		email.WithSender("[email protected]"), email.WithField("ticket", 42), email.WithField("thread_id", nil))
	if err != nil {
		panic(err)
	}
	for _, m := range state {
		fmt.Printf("%s=%v\n", m.Key, m.Value)
	}
	// Output:
	// subject=Refund request
	// body=I was charged twice.
	// [email protected]
	// ticket=42
}