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: exit_code.go
    path of file: ./repos/k6/errext
    
    the code of the file until where you have to start completion: package errext

import (
	"errors"

	"go.k6.io/k6/errext/exitcodes"
)

// ExitCode is the code with which the application should ex
    
func WithExitCodeIfNone(err error, exitCode exitcodes.ExitCode) error {
	if err == nil {
		// No error, do nothing
		return nil
	}
	var ecerr HasExitCode
	if errors.As(err, &ecerr) {
		// The given error already has an exit code, do nothing
		return err
	}
	return withExitCode{err, exitCode}
}