func (s *Sat) ExecFromStdin() error {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()

	if err := scanner.Err(); err != nil {
		return errors.Wrap(err, "failed to scanner.Scan")
	}

	input := scanner.Bytes()

	ctx := vk.NewCtx(s.l, nil, nil)

	// construct a fake HTTP request from the input
	req := &request.CoordinatedRequest{
		Method:      http.MethodPost,
		URL:         "/",
		ID:          ctx.RequestID(),
		Body:        input,
		Headers:     map[string]string{},
		RespHeaders: map[string]string{},
		Params:      map[string]string{},
		State:       map[string][]byte{},
	}

	result, err := s.e.Do(s.j, req, ctx, nil)
	if err != nil {
		return errors.Wrap(err, "failed to exec")
	}

	resp := result.(*request.CoordinatedResponse)

	fmt.Println(string(resp.Output))

	return nil
}
// execFromStdin reads stdin, passes the data through the registered module, and writes the result to stdout
execFromStdin reads stdin, passes the data through the registered module, and writes the result to stdout
// execFromStdin reads stdin passes the data through the registered module and writes the result to stdout
func (s *Sat) ExecFromStdin() error {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Scan()
	if err := scanner.Err(); err != nil {
		return errors.Wrap(err, "failed to scanner.Scan")
	}
	input := scanner.Bytes()
	ctx := vk.NewCtx(s.l, nil, nil)
	req := &request.CoordinatedRequest{
		Method:      http.MethodPost,
		URL:         "/",
		ID:          ctx.RequestID(),
		Body:        input,
		Headers:     map[string]string{},
		RespHeaders: map[string]string{},
		Params:      map[string]string{},
		State:       map[string][]byte{},
	}
	result, err := s.e.Do(s.j, req, ctx, nil)
	if err != nil {
		return errors.Wrap(err, "failed to exec")
	}
	resp := result.(*request.CoordinatedResponse)
	fmt.Println(string(resp.Output))
	return nil
}
func ( s * Sat ) ExecFromStdin ( ) error { scanner := bufio . NewScanner ( os . Stdin ) scanner . Scan ( ) if err := scanner . Err ( ) ; err != nil { return errors . Wrap ( err , " " ) } input := scanner . Bytes ( ) ctx := vk . NewCtx ( s . l , nil , nil ) req := & request . CoordinatedRequest { Method : http . MethodPost , URL : " " , ID : ctx . RequestID ( ) , Body : input , Headers : map [ string ] string { } , RespHeaders : map [ string ] string { } , Params : map [ string ] string { } , State : map [ string ] [ ] byte { } , } result , err := s . e . Do ( s . j , req , ctx , nil ) if err != nil { return errors . Wrap ( err , " " ) } resp := result . ( * request . CoordinatedResponse ) fmt . Println ( string ( resp . Output ) ) return nil }
execFromStdin reads stdin, passes the data through the registered module, and writes the result to stdout
execFromStdin reads stdin passes the data through the registered module and writes the result to stdout
// construct a fake HTTP request from the input