github.com/LagrangeDev/LagrangeGo@v0.0.0-20240512064304-ad4a85e10cb4/client/handler.go (about)

     1  package client
     2  
     3  import "github.com/LagrangeDev/LagrangeGo/client/internal/network"
     4  
     5  // handlerInfo from https://github.com/Mrs4s/MiraiGo/blob/54bdd873e3fed9fe1c944918924674dacec5ac76/client/client.go#L137
     6  type handlerInfo struct {
     7  	fun     func(i any, err error)
     8  	dynamic bool
     9  	params  network.RequestParams
    10  }
    11  
    12  func (h *handlerInfo) getParams() network.RequestParams {
    13  	if h == nil {
    14  		return nil
    15  	}
    16  	return h.params
    17  }