github.com/qioalice/ekago/v3@v3.3.2-0.20221202205325-5c262d586ee4/internal/ekaletter/message.go (about) 1 // Copyright © 2021. All rights reserved. 2 // Author: Ilya Stroy. 3 // Contacts: iyuryevich@pm.me, https://github.com/qioalice 4 // License: https://opensource.org/licenses/MIT 5 6 package ekaletter 7 8 type ( 9 // LetterMessage is a special type that represents a pair: 10 // some message and its stack frame idx in the relevant ekasys.StackTrace slice. 11 // 12 // This struct is designed to be a part of Letter. 13 // When Letter object is instantiated and initialized, it has its own stacktrace. 14 // Using methods you can add a some message to each stacktrace's frame. 15 // That's why you need a LetterMessage struct. 16 // 17 // It guarantees that StackFrameIdx < related ekasys.StackTrace's len, 18 // and Body cannot be an empty string. 19 LetterMessage struct { 20 Body string 21 StackFrameIdx int16 22 } 23 )