Browse Source

调整类名称

Signed-off-by: allan716 <[email protected]>
allan716 4 years ago
parent
commit
f93e8abc06

+ 4 - 0
sub_supplier/shooter/shooter.go

@@ -1,3 +1,7 @@
 package shooter
 
 
+type Supplier struct {
+
+
+}

+ 5 - 5
sub_supplier/xunlei/xunlei.go

@@ -13,15 +13,15 @@ import (
 
 
 
-type SupplierXunLei struct {
+type Supplier struct {
 
 }
 
-func NewSupplierXunLei() *SupplierXunLei {
-	return &SupplierXunLei{}
+func NewSupplier() *Supplier {
+	return &Supplier{}
 }
 
-func (s SupplierXunLei) GetSubListFromFile(filePath string, httpProxy string) ([]sub_supplier.SubInfo, error) {
+func (s Supplier) GetSubListFromFile(filePath string, httpProxy string) ([]sub_supplier.SubInfo, error) {
 	cid, err := s.getCid(filePath)
 	var jsonList SublistSliceXunLei
 	var outSubList []sub_supplier.SubInfo
@@ -56,7 +56,7 @@ func (s SupplierXunLei) GetSubListFromFile(filePath string, httpProxy string) ([
 }
 
 //getCid 获取指定文件的唯一 cid
-func (s SupplierXunLei) getCid(filePath string) (string, error) {
+func (s Supplier) getCid(filePath string) (string, error) {
 	hash := ""
 	sha1Ctx := sha1.New()
 

+ 1 - 1
sub_supplier/xunlei/xunlei_test.go

@@ -6,7 +6,7 @@ import (
 
 func TestGetList(t *testing.T) {
 
-	xunlie := NewSupplierXunLei()
+	xunlie := NewSupplier()
 	outList, err := xunlie.GetSubListFromFile("X:\\电影\\Spiral From the Book of Saw (2021)\\Spiral From the Book of Saw (2021) WEBDL-1080p.mkv", "")
 	if err != nil {
 		t.Error(err)