1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 02:30:39 +08:00

commands/http: Unexported Handler fields and created constructor

This commit is contained in:
Matt Bell
2014-11-03 20:08:08 -08:00
committed by Juan Batiz-Benet
parent 39a60e7f1d
commit 7d4d55a84d

View File

@ -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)