github.com/tada-team/tdproto@v1.51.57/tdapi/main.go (about)

     1  package tdapi
     2  
     3  type PathSpec struct {
     4  	Input  interface{}
     5  	Output interface{}
     6  }
     7  
     8  var Paths = make(map[string]PathSpec)
     9  
    10  func registerPath(path string, spec PathSpec) {
    11  
    12  	if _, ok := Paths[path]; ok {
    13  		panic("path already registered")
    14  	}
    15  	Paths[path] = spec
    16  }