Skip to content

Commit c5d859d

Browse files
committed
Remove: Use nahi
1 parent 3b84669 commit c5d859d

15 files changed

Lines changed: 67 additions & 207 deletions

File tree

alteriso5/cmd/build/cmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import (
66

77
"github.com/FascodeNet/alterlinux/alteriso5/cmd/check"
88
"github.com/FascodeNet/alterlinux/alteriso5/config"
9-
"github.com/FascodeNet/alterlinux/alteriso5/utils"
109
"github.com/FascodeNet/alterlinux/alteriso5/work"
1110
"github.com/Hayao0819/nahi/cobrautils"
11+
"github.com/Hayao0819/nahi/sigutils"
1212
"github.com/spf13/cobra"
1313
)
1414

@@ -20,7 +20,7 @@ func Cmd() *cobra.Command {
2020
RunE: func(cmd *cobra.Command, args []string) error {
2121

2222
// Handle signals
23-
utils.OnSignal(func(s os.Signal) {
23+
sigutils.OnSignal(func(s os.Signal) {
2424
cmd.Println("Received signal:", s)
2525
os.Exit(1)
2626
}, os.Interrupt)

alteriso5/cmd/profile/root.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package profile
22

33
import (
44
"github.com/FascodeNet/alterlinux/alteriso5/config"
5-
"github.com/FascodeNet/alterlinux/alteriso5/utils"
65
"github.com/Hayao0819/nahi/cobrautils"
76
"github.com/spf13/cobra"
87
)
@@ -14,7 +13,7 @@ func Cmd() *cobra.Command {
1413
cmd := cobra.Command{
1514
Use: "profile",
1615
Short: "Debug your profile",
17-
PersistentPreRunE: utils.WithParentPersistentPreRunE(func(cmd *cobra.Command, args []string) error {
16+
PersistentPreRunE: cobrautils.WithParentPersistentPreRunE(func(cmd *cobra.Command, args []string) error {
1817
p, err := config.ReadProfile(args[0])
1918
if err != nil {
2019
return err

alteriso5/cmd/root.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package cmd
22

33
import (
44
"github.com/FascodeNet/alterlinux/alteriso5/log"
5-
"github.com/FascodeNet/alterlinux/alteriso5/utils"
65
"github.com/Hayao0819/nahi/cobrautils"
76
"github.com/spf13/cobra"
87
)
@@ -13,7 +12,7 @@ func Root() *cobra.Command {
1312
root := cobra.Command{
1413
Use: "alteriso5",
1514
Short: "AlterISO5 is a tool to build Arch Linux live ISO images",
16-
PersistentPreRunE: utils.WithParentPersistentPreRunE(func(cmd *cobra.Command, args []string) error {
15+
PersistentPreRunE: cobrautils.WithParentPersistentPreRunE(func(cmd *cobra.Command, args []string) error {
1716
log.Setup()
1817
return nil
1918
}),

alteriso5/config/pkg/package.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"path"
77
"strings"
88

9-
"github.com/FascodeNet/alterlinux/alteriso5/utils"
109
"github.com/Hayao0819/nahi/osutils"
1110
)
1211

@@ -60,7 +59,7 @@ func FindPkgListFiles(profile string, arch string) ([]string, error) {
6059
func ReadPkgListFile(file string) ([]string, error) {
6160
pkgs := []string{}
6261

63-
lines, err := utils.ReadFileLine(file)
62+
lines, err := osutils.ReadFileLine(file)
6463
if err != nil {
6564
return nil, err
6665
}

alteriso5/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ go 1.22.2
44

55
require (
66
github.com/Hayao0819/go-distro v0.0.0-20240502045834-6a4198612fca
7-
github.com/Hayao0819/nahi v0.0.0-20240502081056-dc44714fa053
7+
github.com/Hayao0819/nahi v0.0.0-20240506173511-aa8a1a06908e
8+
github.com/m-mizutani/clog v0.0.4
89
github.com/otiai10/copy v1.14.0
910
github.com/spf13/cobra v1.8.0
1011
)
@@ -15,7 +16,6 @@ require (
1516
github.com/google/uuid v1.3.0 // indirect
1617
github.com/inconshreveable/mousetrap v1.1.0 // indirect
1718
github.com/k0kubun/pp/v3 v3.2.0 // indirect
18-
github.com/m-mizutani/clog v0.0.4 // indirect
1919
github.com/m-mizutani/goerr v0.1.8 // indirect
2020
github.com/mattn/go-colorable v0.1.13 // indirect
2121
github.com/mattn/go-isatty v0.0.19 // indirect

alteriso5/go.sum

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
github.com/Hayao0819/go-distro v0.0.0-20230622042208-721ffcbed8c9 h1:BQ8X+dlAW2hXv598aJF2Xe0z6lG5zwCD59h07PJemRY=
2-
github.com/Hayao0819/go-distro v0.0.0-20230622042208-721ffcbed8c9/go.mod h1:C7RUU7FdBZWMNpHLW23ZoaRZnFraq9CEyEPgA6KIuwY=
31
github.com/Hayao0819/go-distro v0.0.0-20240502045834-6a4198612fca h1:o/8EO1u8fmMfdGUedHN+OvZrLb5kafLdVj4hcQtCkf8=
42
github.com/Hayao0819/go-distro v0.0.0-20240502045834-6a4198612fca/go.mod h1:C7RUU7FdBZWMNpHLW23ZoaRZnFraq9CEyEPgA6KIuwY=
5-
github.com/Hayao0819/nahi v0.0.0-20240206062916-9e007fa67d66 h1:fylheZbDj30rUrGb4kj9uvtjGsiMREWpKwVQeFDWpUE=
6-
github.com/Hayao0819/nahi v0.0.0-20240206062916-9e007fa67d66/go.mod h1:P3boyG1B2+4/J6ln65zsY2XRFitM/LcvKppzwXAPjGw=
7-
github.com/Hayao0819/nahi v0.0.0-20240502081056-dc44714fa053 h1:ayYNdaEWZFhEjFqSTcqtZBZFxLLSdGKhBM7R5dM0rm4=
8-
github.com/Hayao0819/nahi v0.0.0-20240502081056-dc44714fa053/go.mod h1:P3boyG1B2+4/J6ln65zsY2XRFitM/LcvKppzwXAPjGw=
3+
github.com/Hayao0819/nahi v0.0.0-20240506173511-aa8a1a06908e h1:izLYnTxEYfQvr0BltY/ploo3eOCMel674yZG0jDDaFM=
4+
github.com/Hayao0819/nahi v0.0.0-20240506173511-aa8a1a06908e/go.mod h1:6y4OH/3jDW6HX3L2LoaE+GvNlqAzUG0hrpba9U1b2XA=
95
github.com/ashcrow/osrelease v0.0.0-20180626175927-9b292693c55c h1:icme0QhxrgZOxTBnT6K8dfGLwbKWSOVwPB95XTbo8Ws=
106
github.com/ashcrow/osrelease v0.0.0-20180626175927-9b292693c55c/go.mod h1:BRljTyotlu+6N+Qlu5MhjxpdmccCnp9lDvZjNNV8qr4=
117
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
128
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
139
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1410
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
1511
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
12+
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
13+
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
1614
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
1715
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1816
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
@@ -24,6 +22,8 @@ github.com/m-mizutani/clog v0.0.4 h1:6hY5CzHwNS4zuJhF6puazYPtGeaEEGIbrD4Ccimyaow
2422
github.com/m-mizutani/clog v0.0.4/go.mod h1:a2J7BlnXOkaMQ0fNeDBG3IyyyWnCnSKYH8ltHFNDcHE=
2523
github.com/m-mizutani/goerr v0.1.8 h1:6UtsMmOkJsaYNtAsMNLvWIteZPl1NOxpKFYK5m65vpQ=
2624
github.com/m-mizutani/goerr v0.1.8/go.mod h1:fQkXuu06q+oLlp4FkbiTFzI/N/+WAK/Mz1W5kPZ6yzs=
25+
github.com/m-mizutani/gt v0.0.5 h1:mnFJDOfNe5adq2zOxhN1MABX9euu/+086xMRKG/oDgc=
26+
github.com/m-mizutani/gt v0.0.5/go.mod h1:0MPYSfGBLmYjTduzADVmIqD58ELQ5IfBFiK/f0FmB3k=
2727
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
2828
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
2929
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
@@ -45,8 +45,6 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o
4545
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
4646
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
4747
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
48-
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
49-
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
5048
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
5149
golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
5250
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

alteriso5/utils/cobra.go

Lines changed: 0 additions & 23 deletions
This file was deleted.

alteriso5/utils/copy.go

Lines changed: 0 additions & 54 deletions
This file was deleted.

alteriso5/utils/env.go

Lines changed: 0 additions & 26 deletions
This file was deleted.

alteriso5/utils/err.go

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)