decodeStreams decodes the streams. It takes the encoded data as a byte slice and the target Streams object as arguments. Parameters: ss: The encoded data as a byte slice. ss2: The target Streams object to store the decoded data. Returns: error: An error if any occurred during the decoding pro
(ss []byte, ss2 *Streams)
| 654 | // - If any error occurs during the decoding process, it will be returned. |
| 655 | // - On success, it returns nil. |
| 656 | func (s *StreamStructure) decodeStreams(ss []byte, ss2 *Streams) error { |
| 657 | // Decode the streams |
| 658 | if err := json.Unmarshal(ss, ss2); err != nil { |
| 659 | fmt.Println("err", err) |
| 660 | return err |
| 661 | } |
| 662 | return nil |
| 663 | } |
| 664 | |
| 665 | // encodeStreamGroup encodes the stream group. |
| 666 | // It takes the StreamGroup object as an argument and returns the encoded data as a byte slice. |