mirror of
https://github.com/XrayR-project/XrayR.git
synced 2025-09-14 20:34:35 +00:00
Refactor sspanel and test files in the API
Fixed typos, changed variable naming to follow camel case convention, simplified the error handling, and refactored the function names in sspanel.go for improved readability and consistency. Accordingly, updated the test function names in sspanel_test.go to match the changes made in the main file. Additionally, the if condition in ParseSSPanelNodeInfo was streamlined to improve the function's readability and error handling. The changes will help in better understanding the code while debugging or adding new features.
This commit is contained in:
@@ -19,7 +19,7 @@ func CreateClient() api.API {
|
||||
return client
|
||||
}
|
||||
|
||||
func TestGetV2rayNodeinfo(t *testing.T) {
|
||||
func TestGetV2rayNodeInfo(t *testing.T) {
|
||||
client := CreateClient()
|
||||
|
||||
nodeInfo, err := client.GetNodeInfo()
|
||||
@@ -29,7 +29,7 @@ func TestGetV2rayNodeinfo(t *testing.T) {
|
||||
t.Log(nodeInfo)
|
||||
}
|
||||
|
||||
func TestGetSSNodeinfo(t *testing.T) {
|
||||
func TestGetSSNodeInfo(t *testing.T) {
|
||||
apiConfig := &api.Config{
|
||||
APIHost: "http://127.0.0.1:667",
|
||||
Key: "123",
|
||||
@@ -44,7 +44,7 @@ func TestGetSSNodeinfo(t *testing.T) {
|
||||
t.Log(nodeInfo)
|
||||
}
|
||||
|
||||
func TestGetTrojanNodeinfo(t *testing.T) {
|
||||
func TestGetTrojanNodeInfo(t *testing.T) {
|
||||
apiConfig := &api.Config{
|
||||
APIHost: "http://127.0.0.1:667",
|
||||
Key: "123",
|
||||
@@ -59,7 +59,7 @@ func TestGetTrojanNodeinfo(t *testing.T) {
|
||||
t.Log(nodeInfo)
|
||||
}
|
||||
|
||||
func TestGetSSinfo(t *testing.T) {
|
||||
func TestGetSSInfo(t *testing.T) {
|
||||
client := CreateClient()
|
||||
|
||||
nodeInfo, err := client.GetNodeInfo()
|
||||
|
Reference in New Issue
Block a user