File: output_interceptor_win.go

package info (click to toggle)
golang-ginkgo 1.16.5-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,004 kB
  • sloc: sh: 14; makefile: 7
file content (36 lines) | stat: -rw-r--r-- 669 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// +build windows

package remote

import (
	"errors"
	"os"
)

func NewOutputInterceptor() OutputInterceptor {
	return &outputInterceptor{}
}

type outputInterceptor struct {
	intercepting bool
}

func (interceptor *outputInterceptor) StartInterceptingOutput() error {
	if interceptor.intercepting {
		return errors.New("Already intercepting output!")
	}
	interceptor.intercepting = true

	// not working on windows...

	return nil
}

func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput() (string, error) {
	// not working on windows...
	interceptor.intercepting = false

	return "", nil
}

func (interceptor *outputInterceptor) StreamTo(*os.File) {}