agiledragon / agiledragon/gomonkey

ApplyFuncVar和ApplyFunc有什么区别?

Abierto
#135 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
2.3k
Forks
192
Merge medio
1 d 6 h
PR fusionados (30 d)
1

Descripción

Convey("for succ", func() {
str := "hello"
patches := ApplyFuncVar(&fake.Marshal, func (_ interface{}) ([]byte, error) {
return []byte(str), nil
})
defer patches.Reset()
bytes, err := fake.Marshal(nil)
So(err, ShouldEqual, nil)
So(string(bytes), ShouldEqual, str)
})

ApplyFuncVar替换为ApplyFunc不也是同样的效果?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.