include uptime
This commit is contained in:
		
							parent
							
								
									a776984f1b
								
							
						
					
					
						commit
						0c7d8cfc27
					
				
							
								
								
									
										9
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								main.go
									
									
									
									
									
								
							@ -13,6 +13,8 @@ import (
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"log"
 | 
			
		||||
	"os/exec"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"time"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@ -84,8 +86,11 @@ func activeUserCount() int {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func uptime() string {
 | 
			
		||||
	// TODO
 | 
			
		||||
	return "TODO"
 | 
			
		||||
	out, err := exec.Command("uptime").Output()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Fatalf("could not run uptime %s", err)
 | 
			
		||||
	}
 | 
			
		||||
	return strings.TrimSpace(string(out))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func tdp() TildeData {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user