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: commands_runnetwork.go
    path of file: ./repos/buildkit/frontend/dockerfile/instructions
    
    the code of the file until where you have to start completion: package instructions

import (
	"github.com/pkg/errors"
)

type Net
    
func runNetworkPostHook(cmd *RunCommand, req parseRequest) error {
	st := cmd.getExternalValue(networkKey).(*networkState)
	if st == nil {
		return errors.Errorf("no network state")
	}

	value := st.flag.Value
	if !isValidNetwork(value) {
		return errors.Errorf("invalid network mode %q", value)
	}

	st.networkMode = value

	return nil
}