1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-21 17:46:58 -05:00
v2fly/infra/conf/v5cfg/common.go
2021-09-04 19:22:41 +01:00

12 lines
331 B
Go

package v5cfg
import (
"encoding/json"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/registry"
)
func loadHeterogeneousConfigFromRawJson(interfaceType, name string, rawJson json.RawMessage) (proto.Message, error) {
return registry.LoadImplementationByAlias(interfaceType, name, []byte(rawJson))
}