X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=api%2Fexternal_services.go;fp=api%2Fexternal_services.go;h=41f4d872381cfe9fd3dab1eb58992508f9ead21e;hb=299b6b6d9fb879c06e675ef240f361348629ff6c;hp=c467171d275002768f9fc03dbdf26880eeed9bd4;hpb=3b8833854f83f75e3d16c1fdb869937f690e48ea;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FFront.git diff --git a/api/external_services.go b/api/external_services.go index c467171..41f4d87 100644 --- a/api/external_services.go +++ b/api/external_services.go @@ -7,8 +7,8 @@ import ( ) // Use this to call external services. It will handle timeout and request cancellation gracefully. -func CallExternalService(tag string, timeout time.Duration, routine func() *Error) *Error { - routineDone := make(chan *Error) +func CallExternalService(tag string, timeout time.Duration, routine func() error) error { + routineDone := make(chan error) go func() { routineDone <- routine()