mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	workaround broken drone build (#7362)
* workaround broken swagger only master brach is not working, latest release seems to work Signed-off-by: Michael Gnehr <michael@gnehr.de> * make vendor Signed-off-by: Michael Gnehr <michael@gnehr.de> * Don't export GO111MODULE * set go-swagger to fixed release version mentioned here: https://github.com/go-gitea/gitea/pull/7362#discussion_r300831537 Signed-off-by: Michael Gnehr <michael@gnehr.de>
This commit is contained in:
		
							
								
								
									
										13
									
								
								vendor/github.com/prometheus/procfs/proc_stat.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								vendor/github.com/prometheus/procfs/proc_stat.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -18,6 +18,8 @@ import ( | ||||
| 	"fmt" | ||||
| 	"io/ioutil" | ||||
| 	"os" | ||||
|  | ||||
| 	"github.com/prometheus/procfs/internal/fs" | ||||
| ) | ||||
|  | ||||
| // Originally, this USER_HZ value was dynamically retrieved via a sysconf call | ||||
| @@ -95,11 +97,11 @@ type ProcStat struct { | ||||
| 	// in clock ticks. | ||||
| 	Starttime uint64 | ||||
| 	// Virtual memory size in bytes. | ||||
| 	VSize int | ||||
| 	VSize uint | ||||
| 	// Resident set size in pages. | ||||
| 	RSS int | ||||
|  | ||||
| 	fs FS | ||||
| 	proc fs.FS | ||||
| } | ||||
|  | ||||
| // NewStat returns the current status information of the process. | ||||
| @@ -118,7 +120,7 @@ func (p Proc) NewStat() (ProcStat, error) { | ||||
| 	var ( | ||||
| 		ignore int | ||||
|  | ||||
| 		s = ProcStat{PID: p.PID, fs: p.fs} | ||||
| 		s = ProcStat{PID: p.PID, proc: p.fs} | ||||
| 		l = bytes.Index(data, []byte("(")) | ||||
| 		r = bytes.LastIndex(data, []byte(")")) | ||||
| 	) | ||||
| @@ -164,7 +166,7 @@ func (p Proc) NewStat() (ProcStat, error) { | ||||
| } | ||||
|  | ||||
| // VirtualMemory returns the virtual memory size in bytes. | ||||
| func (s ProcStat) VirtualMemory() int { | ||||
| func (s ProcStat) VirtualMemory() uint { | ||||
| 	return s.VSize | ||||
| } | ||||
|  | ||||
| @@ -175,7 +177,8 @@ func (s ProcStat) ResidentMemory() int { | ||||
|  | ||||
| // StartTime returns the unix timestamp of the process in seconds. | ||||
| func (s ProcStat) StartTime() (float64, error) { | ||||
| 	stat, err := s.fs.NewStat() | ||||
| 	fs := FS{proc: s.proc} | ||||
| 	stat, err := fs.NewStat() | ||||
| 	if err != nil { | ||||
| 		return 0, err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Cherrg
					Cherrg