code: func tailStdIn(ctx context.Context) chan string {
  	lines := make(chan string)
  	input := bufio.NewReader(os.Stdin)
  	go func() {
  		defer close(lines)
  		for {
  			// check for signal triggered exit
  			select {
  			case <-ctx.Done():
  				return
  			default:
  			}
  			line, partialLine, err := input.ReadLine()
  			if err != nil {
  				logrus.Debug("stdin is closed")
  				// bail when STDIN closes
  				return
  			}
  			var parts []string
  			parts = append(parts, string(line))
  			for partialLine {
  				line, partialLine, _ = input.ReadLine()
  				parts = append(parts, string(line))
  			}
  			lines <- strings.Join(parts, "")
  		}
  	}()
  	return lines
  }
docs: // tailStdIn is a special case to tail STDIN without any of the
  // fancy stuff that the tail module provides