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: net.go
    path of file: ./repos/AdGuardHome/internal/aghnet
    
    the code of the file until where you have to start completion: // Package aghnet contains some utilities for networking.
package aghnet

import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"io"
	"net"
	"net/netip"
	"net/url"
	"strings"
	"syscall"

	"github.com/AdguardTeam/AdGuardHome/internal/aghos"
	"github.com/AdguardTeam/dnsproxy/upstream"
	"github.com/Adguar
    
func GatewayIP(ifaceName string) (ip netip.Addr) {
	code, out, err := aghosRunCommand("ip", "route", "show", "dev", ifaceName)
	if err != nil {
		log.Debug("%s", err)

		return netip.Addr{}
	} else if code != 0 {
		log.Debug("fetching gateway ip: unexpected exit code: %d", code)

		return netip.Addr{}
	}

	fields := bytes.Fields(out)
	// The meaningful "ip route" command output should contain the word
	// "default" at first field and default gateway IP address at third field.
	if len(fields) < 3 || string(fields[0]) != "default" {
		return netip.Addr{}
	}

	ip, err = netip.ParseAddr(string(fields[2]))
	if err != nil {
		return netip.Addr{}
	}

	return ip
}