repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/simulatelocation.go
hrp/pkg/gidevice/pkg/libimobiledevice/simulatelocation.go
package libimobiledevice import ( "fmt" "math" "strings" ) const SimulateLocationServiceName = "com.apple.dt.simulatelocation" type CoordinateSystem string const ( CoordinateSystemWGS84 CoordinateSystem = "WGS84" CoordinateSystemBD09 CoordinateSystem = "BD09" CoordinateSystemGCJ02 CoordinateSystem = "GCJ02" ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/pcapd.go
hrp/pkg/gidevice/pkg/libimobiledevice/pcapd.go
package libimobiledevice import ( "bytes" "encoding/binary" "fmt" "io/ioutil" "time" "github.com/lunixbochs/struc" ) const PcapdServiceName = "com.apple.pcapd" func NewPcapdClient(innerConn InnerConn) *PcapdClient { return &PcapdClient{ client: newServicePacketClient(innerConn), } } type PcapdClient stru...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/packet_service.go
hrp/pkg/gidevice/pkg/libimobiledevice/packet_service.go
package libimobiledevice import ( "bytes" "encoding/binary" "fmt" "howett.net/plist" ) var _ Packet = (*servicePacket)(nil) type servicePacket struct { length uint32 body []byte } func (p *servicePacket) Pack() ([]byte, error) { buf := new(bytes.Buffer) b := make([]byte, 4) binary.BigEndian.PutUint32(b...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/instruments.go
hrp/pkg/gidevice/pkg/libimobiledevice/instruments.go
package libimobiledevice const ( InstrumentsServiceName = "com.apple.instruments.remoteserver" InstrumentsSecureProxyServiceName = "com.apple.instruments.remoteserver.DVTSecureSocketProxy" ) func NewInstrumentsClient(innerConn InnerConn) *InstrumentsClient { return &InstrumentsClient{ client: newDtxMe...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/usbmux.go
hrp/pkg/gidevice/pkg/libimobiledevice/usbmux.go
package libimobiledevice import ( "bytes" "crypto/tls" "encoding/binary" "fmt" "net" "runtime" "strconv" "time" "howett.net/plist" ) var DefaultDeadlineTimeout = 30 * time.Second const ( BundleID = "electricbubble.libimobiledevice" ProgramName = "libimobiledevice" ClientVersion = "libimo...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/client_dtxmessage.go
hrp/pkg/gidevice/pkg/libimobiledevice/client_dtxmessage.go
package libimobiledevice import ( "bytes" "context" "encoding/hex" "fmt" "io" "strings" "sync" "time" "unsafe" "github.com/test-instructor/yangfan/hrp/pkg/gidevice/pkg/nskeyedarchiver" ) const ( _unregistered = "_Golang-iDevice_Unregistered" _over = "_Golang-iDevice_Over" ) func newDtxMessageCli...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/imagemounter.go
hrp/pkg/gidevice/pkg/libimobiledevice/imagemounter.go
package libimobiledevice import ( "errors" "fmt" "io" "strings" ) const ImageMounterServiceName = "com.apple.mobile.mobile_image_mounter" var ErrDeviceLocked = errors.New("device locked") type CommandType string const ( CommandTypeLookupImage CommandType = "LookupImage" CommandTypeReceiveBytes CommandType =...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/packet_location.go
hrp/pkg/gidevice/pkg/libimobiledevice/packet_location.go
package libimobiledevice import ( "bytes" "encoding/binary" "fmt" "strconv" ) var _ Packet = (*locationPacket)(nil) type locationPacket struct { lon float64 lat float64 } func (l *locationPacket) Pack() ([]byte, error) { buf := new(bytes.Buffer) if err := binary.Write(buf, binary.BigEndian, uint32(0)); err...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/diagnosticsrelay.go
hrp/pkg/gidevice/pkg/libimobiledevice/diagnosticsrelay.go
package libimobiledevice const ( DiagnosticsRelayServiceName = "com.apple.mobile.diagnostics_relay" ) type DiagnosticsRelayBasicRequest struct { Request string `plist:"Request"` Label string `plist:"Label"` } func NewDiagnosticsRelayClient(innerConn InnerConn) *DiagnosticsRelayClient { return &DiagnosticsRelay...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/lockdown.go
hrp/pkg/gidevice/pkg/libimobiledevice/lockdown.go
package libimobiledevice const ProtocolVersion = "2" const LockdownPort = 62078 type RequestType string const ( RequestTypeQueryType RequestType = "QueryType" RequestTypeSetValue RequestType = "SetValue" RequestTypeGetValue RequestType = "GetValue" RequestTypePair RequestType = "Pair" Re...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/lib.go
hrp/pkg/gidevice/pkg/libimobiledevice/lib.go
package libimobiledevice import ( "bytes" "fmt" "github.com/test-instructor/yangfan/server/global" ) type Packet interface { Pack() ([]byte, error) Unpack(buffer *bytes.Buffer) (Packet, error) Unmarshal(v interface{}) error String() string } var debugFlag = false // SetDebug sets debug mode func SetDebug(d...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/afcmessage.go
hrp/pkg/gidevice/pkg/libimobiledevice/afcmessage.go
package libimobiledevice import ( "bytes" "encoding/binary" "errors" ) type AfcMessage struct { Operation uint64 Data []byte Payload []byte } func (m *AfcMessage) Map() map[string]string { ret := make(map[string]string) ss := m.Strings() if ss != nil { for i := 0; i < len(ss); i += 2 { ret[ss[i]...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/packet_dtxmessage.go
hrp/pkg/gidevice/pkg/libimobiledevice/packet_dtxmessage.go
package libimobiledevice import ( "bytes" "encoding/binary" "encoding/hex" "fmt" ) var ( _ Packet = (*dtxMessagePayloadPacket)(nil) _ Packet = (*dtxMessageHeaderPacket)(nil) _ Packet = (*dtxMessagePacket)(nil) ) type dtxMessagePayloadPacket struct { Flags uint32 AuxiliaryLength uint32 TotalLength...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/housearrest.go
hrp/pkg/gidevice/pkg/libimobiledevice/housearrest.go
package libimobiledevice const HouseArrestServiceName = "com.apple.mobile.house_arrest" const ( CommandTypeVendDocuments CommandType = "VendDocuments" CommandTypeVendContainer CommandType = "VendContainer" ) func NewHouseArrestClient(innerConn InnerConn) *HouseArrestClient { return &HouseArrestClient{ newServic...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/syslogrelay.go
hrp/pkg/gidevice/pkg/libimobiledevice/syslogrelay.go
package libimobiledevice const SyslogRelayServiceName = "com.apple.syslog_relay" func NewSyslogRelayClient(innerConn InnerConn) *SyslogRelayClient { return &SyslogRelayClient{ newServicePacketClient(innerConn), } } type SyslogRelayClient struct { client *servicePacketClient } func (c *SyslogRelayClient) InnerC...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/afc.go
hrp/pkg/gidevice/pkg/libimobiledevice/afc.go
package libimobiledevice import ( "bytes" "encoding/hex" "fmt" ) const AfcServiceName = "com.apple.afc" func NewAfcClient(innerConn InnerConn) *AfcClient { return &AfcClient{ innerConn: innerConn, } } type AfcClient struct { innerConn InnerConn packetNum uint64 } func (c *AfcClient) newPacket(operation ui...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/client_servicepacket.go
hrp/pkg/gidevice/pkg/libimobiledevice/client_servicepacket.go
package libimobiledevice import ( "bytes" "encoding/binary" "fmt" "howett.net/plist" ) func newServicePacketClient(innerConn InnerConn) *servicePacketClient { return &servicePacketClient{ innerConn: innerConn, } } type servicePacketClient struct { innerConn InnerConn } func (c *servicePacketClient) NewXml...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/testmanagerd.go
hrp/pkg/gidevice/pkg/libimobiledevice/testmanagerd.go
package libimobiledevice const ( TestmanagerdSecureServiceName = "com.apple.testmanagerd.lockdown.secure" TestmanagerdServiceName = "com.apple.testmanagerd.lockdown" ) func NewTestmanagerdClient(innerConn InnerConn) *TestmanagerdClient { return &TestmanagerdClient{ client: newDtxMessageClient(innerConn), ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/libimobiledevice/packet_usbmux.go
hrp/pkg/gidevice/pkg/libimobiledevice/packet_usbmux.go
package libimobiledevice import ( "bytes" "encoding/binary" "fmt" "howett.net/plist" ) var _ Packet = (*packet)(nil) type packet struct { length uint32 version ProtoVersion msgType ProtoMessageType tag uint32 body []byte } func (p *packet) Pack() ([]byte, error) { buf := new(bytes.Buffer) b := ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nsuuid.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nsuuid.go
package nskeyedarchiver import ( "encoding/hex" "howett.net/plist" ) type NSUUID struct { internal []byte } func NewNSUUID(uuid []byte) *NSUUID { return &NSUUID{ internal: uuid, } } func (ns *NSUUID) archive(objects []interface{}) []interface{} { info := map[string]interface{}{ "NS.uuidbytes": ns.interna...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nsurl_test.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nsurl_test.go
//go:build localtest package nskeyedarchiver import ( "fmt" "testing" ) func TestNSURL_archive(t *testing.T) { objs := make([]interface{}, 0, 1) nsurl := NewNSURL("/tmp") objects := nsurl.archive(objs) fmt.Println(objects) }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nskeyedarchiver_test.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nskeyedarchiver_test.go
//go:build localtest package nskeyedarchiver import ( "fmt" "testing" uuid "github.com/satori/go.uuid" ) func TestMarshal(t *testing.T) { // value := map[string]interface{}{ // "a": 1, // "b": "2", // "c": true, // } // value := []interface{}{ // "a", 1, // "b", "2", // "c", false, // } // val...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nsdictionary.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nsdictionary.go
package nskeyedarchiver import ( "howett.net/plist" ) type NSDictionary struct { internal map[string]interface{} } func NewNSDictionary(value map[string]interface{}) *NSDictionary { return &NSDictionary{ internal: value, } } func (ns *NSDictionary) archive(objects []interface{}) []interface{} { keys := make(...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nsarray.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nsarray.go
package nskeyedarchiver import "howett.net/plist" type NSArray struct { internal []interface{} } func NewNSArray(value []interface{}) *NSArray { return &NSArray{ internal: value, } } func (ns *NSArray) archive(objects []interface{}) []interface{} { objs := make([]interface{}, 0, len(ns.internal)) info := ma...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/xctestconfiguration_test.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/xctestconfiguration_test.go
//go:build localtest package nskeyedarchiver import ( "fmt" "testing" uuid "github.com/satori/go.uuid" ) func TestXCTestConfiguration_archive(t *testing.T) { objs := make([]interface{}, 0, 1) xcTestConfiguration := NewXCTestConfiguration(NewNSUUID(uuid.NewV4().Bytes()), NewNSURL("/tmp"), "", "") objects := xc...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/xctcapabilities.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/xctcapabilities.go
package nskeyedarchiver type XCTCapabilities struct { internal map[string]interface{} } func (caps *XCTCapabilities) archive(objects []interface{}) []interface{} { // TODO caps return nil }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nsdictionary_test.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nsdictionary_test.go
//go:build localtest package nskeyedarchiver import ( "fmt" "testing" ) func TestNSDictionary_archive(t *testing.T) { objs := make([]interface{}, 0, 1) value := map[string]interface{}{ "a": 1, "b": "2", "c": true, } dict := NewNSDictionary(value) objects := dict.archive(objs) fmt.Println(objects) }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nskeyedarchiver.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nskeyedarchiver.go
package nskeyedarchiver import ( "reflect" "howett.net/plist" ) func Marshal(obj interface{}) (raw []byte, err error) { objects := []interface{}{"$null"} objects, _ = archive(objects, obj) archiver := map[string]interface{}{ "$version": 100000, "$archiver": "NSKeyedArchiver", "$top": map[string]inte...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nsarray_test.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nsarray_test.go
//go:build localtest package nskeyedarchiver import ( "fmt" "testing" ) func TestNSArray_archive(t *testing.T) { objs := make([]interface{}, 0, 1) value := []interface{}{ "a", 1, "b", "2", "c", false, } array := NewNSArray(value) objects := array.archive(objs) fmt.Println(objects) }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nsnull.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nsnull.go
package nskeyedarchiver import ( "howett.net/plist" ) type NSNull struct{} func NewNSNull() *NSNull { return &NSNull{} } func (ns *NSNull) archive(objects []interface{}) []interface{} { info := map[string]interface{}{} objects = append(objects, info) info["$class"] = plist.UID(len(objects)) cls := map[stri...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nsuuid_test.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nsuuid_test.go
//go:build localtest package nskeyedarchiver import ( "fmt" "testing" uuid "github.com/satori/go.uuid" ) func TestNSUUID_archive(t *testing.T) { objs := make([]interface{}, 0, 1) nsuuid := NewNSUUID(uuid.NewV4().Bytes()) objects := nsuuid.archive(objs) fmt.Println(objects) }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/xctestconfiguration.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/xctestconfiguration.go
package nskeyedarchiver import ( "reflect" "howett.net/plist" ) type XCTestConfiguration struct { internal map[string]interface{} } func newXCTestConfiguration(cfg interface{}) *XCTestConfiguration { return cfg.(*XCTestConfiguration) } func NewXCTestConfiguration(nsuuid *NSUUID, nsurl *NSURL, targetBundleID, t...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/nskeyedarchiver/nsurl.go
hrp/pkg/gidevice/pkg/nskeyedarchiver/nsurl.go
package nskeyedarchiver import ( "fmt" "howett.net/plist" ) type NSURL struct { internal string } func NewNSURL(path string) *NSURL { return &NSURL{ internal: path, } } func (ns *NSURL) archive(objects []interface{}) []interface{} { info := map[string]interface{}{} objects = append(objects, info) uid :...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/ipa/ipa_test.go
hrp/pkg/gidevice/pkg/ipa/ipa_test.go
//go:build localtest package ipa import ( "testing" ) func TestInfo(t *testing.T) { name := "/Users/hero/Documents/Workspace/GitHub/taobao-iphone-device/tests/testdata/WebDriverAgentRunner.ipa" name = "/private/tmp/derivedDataPath/Build/Products/Release-iphoneos/WebDriverAgentRunner-Runner.ipa" info, err := Inf...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gidevice/pkg/ipa/ipa.go
hrp/pkg/gidevice/pkg/ipa/ipa.go
package ipa import ( "archive/zip" "fmt" "io" "path" "howett.net/plist" ) func Info(ipaPath string) (info map[string]interface{}, err error) { var reader *zip.ReadCloser if reader, err = zip.OpenReader(ipaPath); err != nil { return nil, err } defer func() { err = reader.Close() }() for _, file := ra...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gadb/device_test.go
hrp/pkg/gadb/device_test.go
//go:build localtest package gadb import ( "bytes" "io/ioutil" "os" "strings" "testing" "time" ) func TestDevice_State(t *testing.T) { adbClient, err := NewClient() if err != nil { t.Fatal(err) } devices, err := adbClient.DeviceList() if err != nil { t.Fatal(err) } for i := range devices { dev :...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gadb/client.go
hrp/pkg/gadb/client.go
package gadb import ( "fmt" "strconv" "strings" ) const AdbServerPort = 5037 const AdbDaemonPort = 5555 type Client struct { host string port int } func NewClient() (Client, error) { return NewClientWith("localhost") } func NewClientWith(host string, port ...int) (adbClient Client, err error) { if len(port)...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gadb/transport_test.go
hrp/pkg/gadb/transport_test.go
//go:build localtest package gadb import ( "testing" ) func Test_transport_VerifyResponse(t *testing.T) { SetDebug(true) transport, err := newTransport("localhost:5037") if err != nil { t.Fatal(err) } defer transport.Close() // err = transport.Send("host:123version") err = transport.Send("host:version") ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gadb/device.go
hrp/pkg/gadb/device.go
package gadb import ( "errors" "fmt" "io" "os" "strings" "time" ) type DeviceFileInfo struct { Name string Mode os.FileMode Size uint32 LastModified time.Time } func (info DeviceFileInfo) IsDir() bool { return (info.Mode & (1 << 14)) == (1 << 14) } const DefaultFileMode = os.FileM...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gadb/client_test.go
hrp/pkg/gadb/client_test.go
//go:build localtest package gadb import ( "testing" ) func TestClient_ServerVersion(t *testing.T) { SetDebug(true) adbClient, err := NewClient() if err != nil { t.Fatal(err) } adbServerVersion, err := adbClient.ServerVersion() if err != nil { t.Fatal(err) } t.Log(adbServerVersion) } func TestClient...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gadb/sync_transport.go
hrp/pkg/gadb/sync_transport.go
package gadb import ( "bytes" "encoding/binary" "errors" "fmt" "io" "net" "time" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" ) type syncTransport struct { sock net.Conn readTimeout time.Duration } func newSyncTransport(sock net.Conn, readTimeout time.Duration) syncTranspor...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gadb/gadb.go
hrp/pkg/gadb/gadb.go
package gadb import ( "github.com/test-instructor/yangfan/server/global" ) var debugFlag = false // SetDebug set debug mode func SetDebug(debug bool) { debugFlag = debug } func debugLog(msg string) { if !debugFlag { return } global.GVA_LOG.Info("[DEBUG] [gadb] " + msg) }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gadb/transport.go
hrp/pkg/gadb/transport.go
package gadb import ( "errors" "fmt" "io" "io/ioutil" "net" "strconv" "time" ) var ErrConnBroken = errors.New("socket connection broken") var DefaultAdbReadTimeout time.Duration = 60 type transport struct { sock net.Conn readTimeout time.Duration } func newTransport(address string, readTimeout ...t...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/gadb/examples/main.go
hrp/pkg/gadb/examples/main.go
package main import ( "os" "strings" "github.com/test-instructor/yangfan/hrp/pkg/gadb" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" ) func main() { adbClient, err := gadb.NewClient() checkErr(err, "fail to connect adb server") devices, err := adbClient.DeviceList() checkErr(err) i...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/outputDB.go
hrp/pkg/boomer/outputDB.go
package boomer import ( "encoding/json" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/interfacecase" "go.uber.org/zap" ) type DbOutput struct { ID uint pTask interfacecase.Performance PReport interfacecase.PerformanceReport Report...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/runner_test.go
hrp/pkg/boomer/runner_test.go
package boomer import ( "sync" "sync/atomic" "testing" "time" "github.com/stretchr/testify/assert" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.com/test-instructor/yangfan/hrp/pkg/boomer/grpc/messager" ) type HitOutput struct { onStart bool onEvent bool onStop bool } func (o *HitOut...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/stats.go
hrp/pkg/boomer/stats.go
package boomer import ( "sync/atomic" "time" "github.com/test-instructor/yangfan/hrp/internal/json" ) type transaction struct { name string success bool elapsedTime int64 contentSize int64 } type requestSuccess struct { requestType string name string responseTime int64 responseL...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/server_grpc.go
hrp/pkg/boomer/server_grpc.go
package boomer import ( "context" "fmt" "net" "strings" "sync" "sync/atomic" "time" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" "google.golang.org/grpc/metadata" "google.golang.org/grpc/...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/ulimit.go
hrp/pkg/boomer/ulimit.go
//go:build !windows package boomer import ( "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "syscall" ) // set resource limit // ulimit -n 10240 func SetUlimit(limit uint64) { var rLimit syscall.Rlimit err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rLimit) if err != nil { global.GVA_LO...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/server_grpc_test.go
hrp/pkg/boomer/server_grpc_test.go
package boomer
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/boomer.go
hrp/pkg/boomer/boomer.go
package boomer import ( "math" "os" "os/signal" "syscall" "time" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "golang.org/x/net/context" "github.com/test-instructor/yangfan/hrp/internal/json" ) // Mode is the running mode of boomer, both standalone and distr...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/utils.go
hrp/pkg/boomer/utils.go
package boomer import ( "crypto/md5" "fmt" "io" "math" "os" "runtime/pprof" "strings" "time" uuid "github.com/satori/go.uuid" "github.com/shirou/gopsutil/cpu" "github.com/shirou/gopsutil/mem" "github.com/shirou/gopsutil/process" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" ) fun...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/output_stats.go
hrp/pkg/boomer/output_stats.go
package boomer import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/push" uuid "github.com/satori/go.uuid" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/interfacecase" "go.uber.org/zap" ) var ( instanceMa...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/stats_test.go
hrp/pkg/boomer/stats_test.go
package boomer import ( "testing" ) func TestLogRequest(t *testing.T) { newStats := newRequestStats() newStats.logRequest("http", "success", 2, 30) newStats.logRequest("http", "success", 3, 40) newStats.logRequest("http", "success", 2, 40) newStats.logRequest("http", "success", 1, 20) entry := newStats.get("su...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/client_grpc_test.go
hrp/pkg/boomer/client_grpc_test.go
package boomer
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/ulimit_windows.go
hrp/pkg/boomer/ulimit_windows.go
//go:build windows package boomer import ( "github.com/test-instructor/yangfan/server/global" ) // set resource limit func SetUlimit(limit uint64) { global.GVA_LOG.Warn("windows does not support setting ulimit") }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/runner.go
hrp/pkg/boomer/runner.go
package boomer import ( "fmt" "math/rand" "os" "runtime/debug" "strconv" "sync" "sync/atomic" "time" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/server/model/interfacecase" "go.uber.org/zap" "github.com/jinzhu/copier" "github.com/olekukonko/tablewriter" "githu...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
true
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/utils_test.go
hrp/pkg/boomer/utils_test.go
package boomer import ( "os" "testing" "time" ) func TestRound(t *testing.T) { if int(round(float64(147.5002), .5, -1)) != 150 { t.Error("147.5002 should be rounded to 150") } if int(round(float64(3432.5002), .5, -2)) != 3400 { t.Error("3432.5002 should be rounded to 3400") } roundOne := round(float64(5...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/boomer_test.go
hrp/pkg/boomer/boomer_test.go
package boomer import ( "math" "os" "runtime" "sync/atomic" "testing" "time" ) func TestNewStandaloneBoomer(t *testing.T) { b := NewStandaloneBoomer(100, 10) if b.localRunner.spawnCount != 100 { t.Error("spawnCount should be 100") } if b.localRunner.spawnRate != 10 { t.Error("spawnRate should be 10") ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/task.go
hrp/pkg/boomer/task.go
package boomer // Task is like the "Locust object" in locust, the python version. // When boomer receives a start message from master, it will spawn several goroutines to run Task.Fn. // But users can keep some information in the python version, they can't do the same things in boomer. // Because Task.Fn is a pure fun...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/client_grpc.go
hrp/pkg/boomer/client_grpc.go
package boomer import ( "context" "fmt" "runtime" "sync" "sync/atomic" "time" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "golang.org/x/oauth2" "google.golang.org/grpc" "google.golang.org/grpc/backoff" "google.golang.org/grpc/credentials" "google.golang.o...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/output.go
hrp/pkg/boomer/output.go
package boomer import ( "fmt" "math" "os" "sort" "strconv" "sync" "time" "github.com/olekukonko/tablewriter" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/push" uuid "github.com/satori/go.uuid" "github.com/test-instructor/yangfan/...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/message.go
hrp/pkg/boomer/message.go
package boomer const ( typeClientReady = "client_ready" typeClientStopped = "client_stopped" typeHeartbeat = "heartbeat" typeSpawning = "spawning" typeSpawningComplete = "spawning_complete" typeQuit = "quit" typeException = "exception" ) type genericMessage struct { T...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/temp.go
hrp/pkg/boomer/temp.go
package boomer import ( "fmt" "gopkg.in/yaml.v3" "os" ) var tempPath = "temp.yaml" type Temp struct { Node *Node `mapstructure:"node" json:"node" yaml:"node"` } type Node struct { ID string `mapstructure:"id" json:"id" yaml:"id"` } type tempConfig struct { *Temp } var TempConfig *tempConfig func NewTempCon...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/ratelimiter.go
hrp/pkg/boomer/ratelimiter.go
package boomer import ( "errors" "math" "strconv" "strings" "sync" "sync/atomic" "time" ) // RateLimiter is used to put limits on task executions. type RateLimiter interface { // Start is used to enable the rate limiter. // It can be implemented as a noop if not needed. Start() // Acquire() is called befo...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/message_test.go
hrp/pkg/boomer/message_test.go
package boomer
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/output_test.go
hrp/pkg/boomer/output_test.go
package boomer import ( "fmt" "math" "testing" ) func TestGetMedianResponseTime(t *testing.T) { numRequests := int64(10) responseTimes := map[int64]int64{ 100: 1, 200: 3, 300: 6, } medianResponseTime := getMedianResponseTime(numRequests, responseTimes) if medianResponseTime != 300 { t.Error("medianRe...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/ratelimiter_test.go
hrp/pkg/boomer/ratelimiter_test.go
package boomer import ( "testing" "time" ) func TestStableRateLimiter(t *testing.T) { rateLimiter := NewStableRateLimiter(1, 10*time.Millisecond) rateLimiter.Start() defer rateLimiter.Stop() blocked := rateLimiter.Acquire() if blocked { t.Error("Unexpected blocked by rate limiter") } blocked = rateLimiter...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/grpc/messager/messager.pb.go
hrp/pkg/boomer/grpc/messager/messager.pb.go
// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.0 // protoc v3.19.4 // source: grpc/proto/messager.proto package messager import ( reflect "reflect" sync "sync" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runti...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/grpc/messager/messager_grpc.pb.go
hrp/pkg/boomer/grpc/messager/messager_grpc.pb.go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.19.4 // source: grpc/proto/messager.proto package messager import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/stat...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/boomer/data/data.go
hrp/pkg/boomer/data/data.go
/* * Copyright 2020 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_curl_test.go
hrp/pkg/convert/from_curl_test.go
package convert import ( "testing" "github.com/stretchr/testify/assert" ) var curlPath = "../../../examples/data/curl/curl_examples.txt" func TestLoadCurlCase(t *testing.T) { tCase, err := LoadCurlCase(curlPath) if !assert.NoError(t, err) { t.Fatal(err) } if !assert.Equal(t, 6, len(tCase.TestSteps)) { t.F...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_curl.go
hrp/pkg/convert/from_curl.go
package convert import ( "fmt" "net/http" "net/url" "strings" "github.com/google/shlex" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.com/test-instructo...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_json.go
hrp/pkg/convert/from_json.go
package convert import ( "github.com/pkg/errors" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/internal/builtin" ) func LoadJSONCase(path string) (*hrp.TCase, error) { // load json case file caseJSON := new(hrp.TCase) err := builtin.LoadFile(path, caseJSON) if err != nil { ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_gotest.go
hrp/pkg/convert/from_gotest.go
package convert import ( _ "embed" "os" "github.com/rs/zerolog/log" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/internal/myexec" ) func convert2GoTestScripts(paths ...string) error { log.Warn().Msg("convert to gotest scripts is not supported yet") os.Exit(1) // TODO va...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/converter_test.go
hrp/pkg/convert/converter_test.go
package convert import ( "testing" "github.com/stretchr/testify/assert" "github.com/test-instructor/yangfan/hrp" ) const ( profilePath = "../../../examples/data/profile.yml" profileOverridePath = "../../../examples/data/profile_override.yml" ) func TestLoadTCase(t *testing.T) { tCase, err := LoadTCas...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_swagger.go
hrp/pkg/convert/from_swagger.go
package convert import ( "github.com/go-openapi/spec" "github.com/pkg/errors" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/internal/builtin" ) func LoadSwaggerCase(path string) (*hrp.TCase, error) { // load swagger file caseSwagger := new(spec.Swagger) err := builtin.LoadFi...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_pytest.go
hrp/pkg/convert/from_pytest.go
package convert
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_har_test.go
hrp/pkg/convert/from_har_test.go
package convert import ( "testing" "github.com/stretchr/testify/assert" "github.com/test-instructor/yangfan/hrp" ) var harPath = "../../../examples/data/har/demo.har" var caseHar *CaseHar func init() { caseHar, _ = loadCaseHAR(harPath) } func TestLoadHAR(t *testing.T) { caseHAR, err := loadCaseHAR(harPath) ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_yaml.go
hrp/pkg/convert/from_yaml.go
package convert import ( "reflect" "github.com/pkg/errors" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/internal/builtin" ) func NewYAMLCase(path string) (*hrp.TCase, error) { // load yaml case file caseJSON := new(hrp.TCase) err := builtin.LoadFile(path, caseJSON) if err...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_har.go
hrp/pkg/convert/from_har.go
package convert import ( "encoding/base64" "fmt" "net/url" "reflect" "sort" "strings" "time" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.com/test-in...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_postman_test.go
hrp/pkg/convert/from_postman_test.go
package convert import ( "testing" "github.com/stretchr/testify/assert" ) var collectionPath = "../../../examples/data/postman/postman_collection.json" func TestLoadCollection(t *testing.T) { casePostman, err := loadCasePostman(collectionPath) if !assert.NoError(t, err) { t.Fatal(err) } if !assert.Equal(t, ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/from_postman.go
hrp/pkg/convert/from_postman.go
package convert import ( "fmt" "net/url" "reflect" "strings" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.com/test-instructor/yangfan/hrp/internal/json"...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/pkg/convert/converter.go
hrp/pkg/convert/converter.go
package convert import ( _ "embed" "fmt" "os" "path/filepath" "strings" "time" "github.com/pkg/errors" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.com/test-instructor/yangfa...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/pytest.go
hrp/cmd/pytest.go
package cmd import ( "fmt" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp/internal/myexec" "github.com/test-instructor/yangfan/hrp/internal/pytest" "github.com/test-instructor/yangfan/hrp/internal/version" ) var pytestCmd ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/root.go
hrp/cmd/root.go
package cmd import ( "os" "runtime" "strings" "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp/cmd/adb" "github.com/test-instructor/yangfan/hrp/cmd/ios" "github.com/test...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/convert.go
hrp/cmd/convert.go
package cmd import ( "errors" "fmt" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp/internal/myexec" "github.com/test-instructor/yangfan/hrp/internal/version" "github.com/test-instructor/yangfan/hrp/pkg/convert" ) var conv...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/build.go
hrp/cmd/build.go
package cmd import ( "github.com/spf13/cobra" "github.com/test-instructor/yangfan/hrp" ) var buildCmd = &cobra.Command{ Use: "build $path ...", Short: "build plugin for testing", Long: `build python/go plugin for testing`, Example: ` $ hrp build plugin/debugtalk.go $ hrp build plugin/debugtalk.py`, Args...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/scaffold.go
hrp/cmd/scaffold.go
package cmd import ( "errors" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp/internal/scaffold" ) var scaffoldCmd = &cobra.Command{ Use: "startproject $project_name", Aliases: []string{"scaffold"}, Short: "create a ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/wiki.go
hrp/cmd/wiki.go
package cmd import ( "github.com/spf13/cobra" "github.com/test-instructor/yangfan/hrp/internal/wiki" ) var wikiCmd = &cobra.Command{ Use: "wiki", Aliases: []string{"info", "docs", "doc"}, Short: "visit https://httprunner.com", PreRun: func(cmd *cobra.Command, args []string) { setLogLevel(logLevel) }, ...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/curl.go
hrp/cmd/curl.go
package cmd import ( "fmt" "os" "strings" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/pkg/boomer" "github.com/test-instructor/yangfan/hrp/pkg/convert" ) var runCurlCmd = &cobra...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/boom.go
hrp/cmd/boom.go
package cmd import ( "strings" "time" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/server/global" "go.uber.org/zap" "golang.org/x/net/context" "github.com/test-instructor/yangfan/hrp" "github.com/test-instructor/yangfan/hrp/internal/builtin" "github.com/test-instructor/yangfan/hrp/pkg/boomer...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/run.go
hrp/cmd/run.go
package cmd import ( "github.com/spf13/cobra" "github.com/test-instructor/yangfan/hrp" ) // runCmd represents the run command var runCmd = &cobra.Command{ Use: "run $path...", Short: "run API test with go engine", Long: `run yaml/json testcase files for API test`, Example: ` $ hrp run demo.json # run speci...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/dial.go
hrp/cmd/dial.go
package cmd import ( "runtime" "time" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/server/global" "github.com/test-instructor/yangfan/hrp/internal/dial" ) var ( pingOptions dial.PingOptions dnsOptions dial.DnsOptions traceRouteOptions dial.TraceRouteOptions ) var pingCmd = &cob...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/doc_test.go
hrp/cmd/doc_test.go
package cmd import ( "testing" "github.com/spf13/cobra/doc" ) // run this test to generate markdown docs for hrp command func TestGenMarkdownTree(t *testing.T) { err := doc.GenMarkdownTree(rootCmd, "../../docs/cmd") if err != nil { t.Fatal(err) } }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/cli/main.go
hrp/cmd/cli/main.go
package main import ( "os" "time" "github.com/getsentry/sentry-go" "github.com/test-instructor/yangfan/hrp/cmd" ) func main() { defer func() { if err := recover(); err != nil { // report panic to sentry sentry.CurrentHub().Recover(err) sentry.Flush(time.Second * 5) // print panic trace panic(...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/adb/devices.go
hrp/cmd/adb/devices.go
package adb import ( "encoding/json" "fmt" "os" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/hrp/pkg/gadb" "github.com/test-instructor/yangfan/hrp/pkg/uixt" ) func format(data map[string]string) string { result, _ := json.MarshalIndent(data, "", "\t") return string(r...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/adb/init.go
hrp/cmd/adb/init.go
package adb import "github.com/spf13/cobra" var androidRootCmd = &cobra.Command{ Use: "adb", Short: "simple utils for android device management", PersistentPreRun: func(cmd *cobra.Command, args []string) {}, } func Init(rootCmd *cobra.Command) { rootCmd.AddCommand(androidRootCmd) }
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/ios/devices.go
hrp/cmd/ios/devices.go
package ios import ( "encoding/json" "fmt" "os" "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/hrp/pkg/gidevice" "github.com/test-instructor/yangfan/hrp/pkg/uixt" ) type Device struct { d gidevice.Device UDID string `json:"UDID"` Status...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false
test-instructor/yangfan
https://github.com/test-instructor/yangfan/blob/b652da8cc7c6973b1ff10c8154fac49f2d99834d/hrp/cmd/ios/init.go
hrp/cmd/ios/init.go
package ios import ( "fmt" "os" "github.com/spf13/cobra" "github.com/test-instructor/yangfan/hrp/pkg/gidevice" "github.com/test-instructor/yangfan/hrp/pkg/uixt" ) var iosRootCmd = &cobra.Command{ Use: "ios", Short: "simple utils for ios device management", } func getDevice(udid string) (gidevice.Device, e...
go
Apache-2.0
b652da8cc7c6973b1ff10c8154fac49f2d99834d
2026-01-07T09:45:38.570425Z
false