mirror of
https://codeberg.org/frosty/modbot.git
synced 2024-09-19 03:36:35 -04:00
move formatter to ui package
This commit is contained in:
parent
a0d943d710
commit
336111f854
|
@ -14,7 +14,7 @@
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
package main
|
package ui
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
3
main.go
3
main.go
|
@ -21,6 +21,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"codeberg.org/frosty/sysinfo/lib/readers"
|
"codeberg.org/frosty/sysinfo/lib/readers"
|
||||||
|
"codeberg.org/frosty/sysinfo/lib/ui"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -34,7 +35,7 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("%v\n", err)
|
log.Fatalf("%v\n", err)
|
||||||
}
|
}
|
||||||
fmt.Printf("RAM: %v / %v\n", PrettifySize(memoryInfo.Used, 2), PrettifySize(memoryInfo.Total, 2))
|
fmt.Printf("RAM: %v / %v\n", ui.PrettifySize(memoryInfo.Used, 2), ui.PrettifySize(memoryInfo.Total, 2))
|
||||||
|
|
||||||
cpuUsageInfo, err := readers.ReadCpuUsage()
|
cpuUsageInfo, err := readers.ReadCpuUsage()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue