package QuectelAT import "strings" const ( CMD = "CMD" ) type SentenceCMD struct { Message []string CMD string } func (s SentenceCMD) DataType() string { return CMD } func NewCMD(raw string) Sentence { Index := strings.Index(raw, ":") return SentenceCMD{ CMD: raw[1:Index], Message: strings.Split(raw[Index+2:], ","), } }