Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The snap package conflicts with the compiled binary package #89

Closed
Kayuii opened this issue Mar 8, 2023 · 0 comments
Closed

The snap package conflicts with the compiled binary package #89

Kayuii opened this issue Mar 8, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Kayuii
Copy link
Contributor

Kayuii commented Mar 8, 2023

Describe the bug
After installing the package of snap, you cannot use the binary program compiled by yourself to operate the/etc/hosts file. Even if you uninstall the package of snap, it will not return to normal

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

$ hostctl list
+---------+--------+-----------+-----------------+
| PROFILE | STATUS |    IP     |     DOMAIN      |
+---------+--------+-----------+-----------------+
| default | on     | 127.0.0.1 | localhost       |
| default | on     | 127.0.1.1 | pc1           |
| default | on     | ::1       | ip6-localhost   |
| default | on     | fe00::    | ip6-localnet    |
| default | on     | ff00::    | ip6-mcastprefix |
| default | on     | ff02::1   | ip6-allnodes    |
| default | on     | ff02::2   | ip6-allrouters  |
+---------+--------+-----------+-----------------+
$ ./hostctl list
panic: runtime error: index out of range [1] with length 0

goroutine 1 [running]:
github.com/guumaster/hostctl/pkg/parser.parseRouteLine({0xbc68c0?, 0x8?})
	/mnt/001/project/dns/hostctl/pkg/parser/parser.go:146 +0x252
github.com/guumaster/hostctl/pkg/parser.parseToDefault({0xc0005ca024, 0x1, 0xfdc}, {0x0?, 0x3?})
	/mnt/001/project/dns/hostctl/pkg/parser/parser.go:102 +0x6e
github.com/guumaster/hostctl/pkg/parser.Parse({0x959a00, 0xc00059e060})
	/mnt/001/project/dns/hostctl/pkg/parser/parser.go:67 +0x48a
github.com/guumaster/hostctl/pkg/file.NewWithFs({0x89bf75?, 0x89b749?}, {0x95edc0?, 0xc2e880?})
	/mnt/001/project/dns/hostctl/pkg/file/file.go:44 +0x112
github.com/guumaster/hostctl/pkg/file.NewFile(...)
	/mnt/001/project/dns/hostctl/pkg/file/file.go:27
github.com/guumaster/hostctl/cmd/hostctl/actions.newListCmd.func1(0xc0005ae000?, {0xc2e880, 0x0, 0x0})
	/mnt/001/project/dns/hostctl/cmd/hostctl/actions/list.go:25 +0x5f
github.com/spf13/cobra.(*Command).execute(0xc0005ae000, {0xc2e880, 0x0, 0x0})
	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc00047b400)
	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:990 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:918
main.main()
	/mnt/001/project/dns/hostctl/cmd/hostctl/main.go:20 +0x76

System (please complete the following information):

  • OS: ubuntu
  • Version: 22.04TLS

Additional context
Add any other context about the problem here.

@Kayuii Kayuii added the bug Something isn't working label Mar 8, 2023
Kayuii added a commit to Kayuii/hostctl that referenced this issue Mar 8, 2023
guumaster pushed a commit that referenced this issue Mar 8, 2023
* #89 fix panic: runtime error: index out of range [1] with length 0
@Kayuii Kayuii closed this as completed Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants