mirror of
https://github.com/minio/minio.git
synced 2025-11-23 02:57:42 -05:00
simplify probe APIs
This commit is contained in:
@@ -49,7 +49,7 @@ func getAuth(reply *AuthReply) *probe.Error {
|
||||
// Get auth keys
|
||||
func (s *AuthService) Get(r *http.Request, args *Args, reply *AuthReply) error {
|
||||
if err := getAuth(reply); err != nil {
|
||||
return probe.NewWrappedError(err)
|
||||
return probe.WrapError(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ func setDonut(args *DonutArgs, reply *Reply) *probe.Error {
|
||||
// Set method
|
||||
func (s *DonutService) Set(r *http.Request, args *DonutArgs, reply *Reply) error {
|
||||
if err := setDonut(args, reply); err != nil {
|
||||
return probe.NewWrappedError(err)
|
||||
return probe.WrapError(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ func setMemStatsReply(sis *MemStatsReply) *probe.Error {
|
||||
// Get method
|
||||
func (s *SysInfoService) Get(r *http.Request, args *Args, reply *SysInfoReply) error {
|
||||
if err := setSysInfoReply(reply); err != nil {
|
||||
return probe.NewWrappedError(err)
|
||||
return probe.WrapError(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -78,7 +78,7 @@ func (s *SysInfoService) Get(r *http.Request, args *Args, reply *SysInfoReply) e
|
||||
// Get method
|
||||
func (s *MemStatsService) Get(r *http.Request, args *Args, reply *MemStatsReply) error {
|
||||
if err := setMemStatsReply(reply); err != nil {
|
||||
return probe.NewWrappedError(err)
|
||||
return probe.WrapError(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user