mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-30 18:13:54 +08:00
commands/http: Unexported Handler fields and created constructor
This commit is contained in:

committed by
Juan Batiz-Benet

parent
39a60e7f1d
commit
7d4d55a84d
@ -50,7 +50,7 @@ func daemonFunc(res cmds.Response, req cmds.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
handler := cmdsHttp.Handler{*ctx, commands.Root}
|
||||
handler := cmdsHttp.NewHandler(*ctx, commands.Root)
|
||||
http.Handle(cmdsHttp.ApiPath+"/", handler)
|
||||
|
||||
fmt.Printf("API server listening on '%s'\n", host)
|
||||
|
Reference in New Issue
Block a user