You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: customWriter_test.go
    path of file: ./repos/gauge/logger
    
    the code of the file until where you have to start completion: /*----------------------------------------------------------------
 *  Copyright (c) ThoughtWorks, Inc.
 *  Licensed under the Apache License, Version 2.0
 *  See LICENSE in the project root for license information.
 *----------------------------------------------------------------*/

package logger

import (
	"bytes"
	"testing"
	"time"
)

func TestCustomWriterShouldExtractPortNumberFromStdout(t *testing.T) {
	portChan := make(chan string)
	var b bytes.Buffer
	w := CustomWriter{
		file: &b,
		port: portChan,
	}

	go func() {
		n, err := w.Write([]byte("Listening on port:23454"))
		if n <= 0 || err != nil {
			t.Errorf("failed to write port information")
		}
	}()

	select {
	case port :
    
func TestCustomWriterShouldExtractPortNumberFromStdoutWithMultipleLines(t *testing.T) {
	portChan := make(chan string)
	var b bytes.Buffer
	w := CustomWriter{
		file: &b,
		port: portChan,
	}

	go func() {
		s := `{"logLevel": "debug", "message": "Loading step implementations from spec0_3389569547211323752\step_impl dirs."}
{"logLevel": "debug", "message": "Starting grpc server.."}
{"logLevel": "info", "message": "Listening on port:50042"}`
		n, err := w.Write([]byte(s))
		if n <= 0 || err != nil {
			t.Errorf("failed to write port information")
		}
	}()

	select {
	case port := <-portChan:
		close(portChan)
		if port != "50042" {
			t.Errorf("Expected:%s\nGot     :%s", "50042", port)
		}
	case <-time.After(3 * time.Second):
		t.Errorf("Timed out!! Failed to get port info.")
	}
}