Skip to content

Commit 8fd61de

Browse files
author
sunqiang1
committed
[feat] ephemeral status
1 parent 87ded09 commit 8fd61de

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/status/status.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ func New(code int, msg string) *Status {
6666
}
6767

6868
estatus := add(code, msg)
69+
return estatus
70+
}
6971

72+
// Ephemeral returns a ephemeral Status instance for once
73+
func Ephemeral(code int, msg string) *Status {
74+
estatus := new(code, msg)
7075
return estatus
7176
}
7277

0 commit comments

Comments
 (0)