code: func (r *StartProgramRequest) MarshalBinary() ([]byte, error) {
  	var env bytes.Buffer
  
  	if n := len(r.EnvVars); n != 0 {
  		for _, e := range r.EnvVars {
  			_, _ = env.Write([]byte(e))
  			_ = env.WriteByte(0)
  		}
  		r.Body.NumEnvVars = uint32(n)
  		r.Body.EnvVarLength = uint32(env.Len())
  	}
  
  	var fields []string
  
  	add := func(s string, l *uint32) {
  		if n := len(s); n != 0 {
  			*l = uint32(n) + 1
  			fields = append(fields, s)
  		}
  	}
  
  	add(r.ProgramPath, &r.Body.ProgramPathLength)
  	add(r.Arguments, &r.Body.ArgumentsLength)
  	add(r.WorkingDir, &r.Body.WorkingDirLength)
  
  	buf := new(bytes.Buffer)
  
  	_ = binary.Write(buf, binary.LittleEndian, &r.Body)
  
  	for _, val := range fields {
  		_, _ = buf.Write([]byte(val))
  		_ = buf.WriteByte(0)
  	}
  
  	if r.Body.EnvVarLength != 0 {
  		_, _ = buf.Write(env.Bytes())
  	}
  
  	return buf.Bytes(), nil
  }
docs: // MarshalBinary implements the encoding.BinaryMarshaler interface