// 可以读这两种 "abc" `abc` ,返回这个东西实际存放的信息. func MustReadGoString(r *kmgGoReader.Reader) (output []byte) { b := r.ReadByte() if b == '"' { buf := &bytes.Buffer{} for { if r.IsEof() { panic(r.GetFileLineInfo() + " unexcept EOF " + buf.String()) } b := r.ReadByte() switch b { case '"': return buf.Bytes() case '\\': handleSlashInGoChar(r, buf) default: buf.WriteByte(b) } } } else if b == '`' { return r.ReadUntilByte('`') } else { panic(fmt.Errorf("%s unexcept byte %d '%s'", r.GetFileLineInfo(), b, string(rune(b)))) } }