mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: change typo from Use to Intercept (#3290)
This commit is contained in:
@@ -179,7 +179,7 @@ func (c *CarClient) Use(hooks ...Hook) {
|
||||
c.hooks.Car = append(c.hooks.Car, hooks...)
|
||||
}
|
||||
|
||||
// Use adds a list of query interceptors to the interceptors stack.
|
||||
// Intercept adds a list of query interceptors to the interceptors stack.
|
||||
// A call to `Intercept(f, g, h)` equals to `car.Intercept(f(g(h())))`.
|
||||
func (c *CarClient) Intercept(interceptors ...Interceptor) {
|
||||
c.inters.Car = append(c.inters.Car, interceptors...)
|
||||
@@ -313,7 +313,7 @@ func (c *GroupClient) Use(hooks ...Hook) {
|
||||
c.hooks.Group = append(c.hooks.Group, hooks...)
|
||||
}
|
||||
|
||||
// Use adds a list of query interceptors to the interceptors stack.
|
||||
// Intercept adds a list of query interceptors to the interceptors stack.
|
||||
// A call to `Intercept(f, g, h)` equals to `group.Intercept(f(g(h())))`.
|
||||
func (c *GroupClient) Intercept(interceptors ...Interceptor) {
|
||||
c.inters.Group = append(c.inters.Group, interceptors...)
|
||||
@@ -447,7 +447,7 @@ func (c *UserClient) Use(hooks ...Hook) {
|
||||
c.hooks.User = append(c.hooks.User, hooks...)
|
||||
}
|
||||
|
||||
// Use adds a list of query interceptors to the interceptors stack.
|
||||
// Intercept adds a list of query interceptors to the interceptors stack.
|
||||
// A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
|
||||
func (c *UserClient) Intercept(interceptors ...Interceptor) {
|
||||
c.inters.User = append(c.inters.User, interceptors...)
|
||||
|
||||
Reference in New Issue
Block a user