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_ip_socket.go
    path of file: ./repos/faasd/vendor/github.com/prometheus/procfs
    
    the code of the file until where you have to start completion: // Copyright 2020 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// yo
    
func newNetIPSocketSummary(file string) (*NetIPSocketSummary, error) {
	f, err := os.Open(file)
	if err != nil {
		return nil, err
	}
	defer f.Close()

	var netIPSocketSummary NetIPSocketSummary

	lr := io.LimitReader(f, readLimit)
	s := bufio.NewScanner(lr)
	s.Scan() // skip first line with headers
	for s.Scan() {
		fields := strings.Fields(s.Text())
		line, err := parseNetIPSocketLine(fields)
		if err != nil {
			return nil, err
		}
		netIPSocketSummary.TxQueueLength += line.TxQueue
		netIPSocketSummary.RxQueueLength += line.RxQueue
		netIPSocketSummary.UsedSockets++
	}
	if err := s.Err(); err != nil {
		return nil, err
	}
	return &netIPSocketSummary, nil
}