Stuff
This commit is contained in:
19
.github/workflows/go.yml
vendored
Normal file
19
.github/workflows/go.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.23'
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
21
.github/workflows/release.yml
vendored
Normal file
21
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Build and Release Go Binary
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
release-linux-amd64:
|
||||
name: release linux/amd64
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: wangyoucao577/go-release-action@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Syed
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
4
go.mod
4
go.mod
@@ -1,10 +1,10 @@
|
||||
module tuipart
|
||||
|
||||
go 1.23.3
|
||||
go 1.23
|
||||
|
||||
require (
|
||||
github.com/gdamore/encoding v1.0.0 // indirect
|
||||
github.com/gdamore/tcell/v2 v2.7.4 // indirect
|
||||
github.com/gdamore/tcell/v2 v2.7.4 // direct
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.15 // indirect
|
||||
github.com/rivo/uniseg v0.4.3 // indirect
|
||||
|
||||
19
main.go
19
main.go
@@ -24,25 +24,6 @@ var symbols []rune
|
||||
|
||||
func main() {
|
||||
symbols = []rune("")
|
||||
/*
|
||||
// ╭───╮
|
||||
// │ │
|
||||
// ╰───╯
|
||||
disk := "nvme0n1"
|
||||
parts := getPartitions()
|
||||
mounted_parts(disk, parts)
|
||||
part_labels(disk, parts)
|
||||
fmt.Println(parts)
|
||||
for _, val := range parts {
|
||||
x, y := get_used_p(disk+"p"+val[0], val[4])
|
||||
if y != nil {
|
||||
fmt.Println(disk+"p"+val[0], val[4], "--")
|
||||
} else {
|
||||
fmt.Println(disk+"p"+val[0], val[4], fmt.Sprintf("%.2f%%", x))
|
||||
}
|
||||
}
|
||||
return
|
||||
//*/
|
||||
screen_tmp, err := tcell.NewScreen()
|
||||
if err != nil {
|
||||
log.Fatalf("Error creating screen: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user