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: proc_stat.go
    path of file: ./repos/corteza/server/vendor/github.com/prometheus/procfs
    
    the code of the file until where you have to start completion: // Copyright 2018 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package procfs

import (
	"bytes"
	"fmt"
	"os"

	"github.com/prometheus/procfs/internal/fs"
	"github.com/prometheus/procfs/internal/util"
)

// Originally, this USER_HZ value was dynamically retrieved via a sysconf call
// which required cgo. However, that caused a lot of problems regarding
// cross-compilation. Alternatives such as running a binary to determine the
// value, or trying to derive it in some other way were all problematic.  After
// much research it was determined that USER_HZ is act
    
func (p Proc) Stat() (ProcStat, error) {
	data, err := util.ReadFileNoStat(p.path("stat"))
	if err != nil {
		return ProcStat{}, err
	}

	var (
		ignoreInt64  int64
		ignoreUint64 uint64

		s = ProcStat{PID: p.PID, proc: p.fs}
		l = bytes.Index(data, []byte("("))
		r = bytes.LastIndex(data, []byte(")"))
	)

	if l < 0 || r < 0 {
		return ProcStat{}, fmt.Errorf("unexpected format, couldn't extract comm %q", data)
	}

	s.Comm = string(data[l+1 : r])
	_, err = fmt.Fscan(
		bytes.NewBuffer(data[r+2:]),
		&s.State,
		&s.PPID,
		&s.PGRP,
		&s.Session,
		&s.TTY,
		&s.TPGID,
		&s.Flags,
		&s.MinFlt,
		&s.CMinFlt,
		&s.MajFlt,
		&s.CMajFlt,
		&s.UTime,
		&s.STime,
		&s.CUTime,
		&s.CSTime,
		&s.Priority,
		&s.Nice,
		&s.NumThreads,
		&ignoreInt64,
		&s.Starttime,
		&s.VSize,
		&s.RSS,
		&s.RSSLimit,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreUint64,
		&ignoreInt64,
		&ignoreInt64,
		&s.RTPriority,
		&s.Policy,
		&s.DelayAcctBlkIOTicks,
	)
	if err != nil {
		return ProcStat{}, err
	}

	return s, nil
}