From 275b8723a06fde8ce8a2817c2a6a585f9b7e349e Mon Sep 17 00:00:00 2001 From: wuye251 <754093136@qq.com> Date: Tue, 21 Feb 2023 22:49:58 +0800 Subject: [PATCH] upgrade template call genAndSendOTP function by concrete product --- template/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/template/main.go b/template/main.go index ebf78fb..341465e 100644 --- a/template/main.go +++ b/template/main.go @@ -17,16 +17,16 @@ func main() { // emailOTP.genAndSendOTP(emailOTP, 4) // fmt.Scanln() smsOTP := &Sms{} - o := Otp{ + smsOTP.Otp = Otp{ iOtp: smsOTP, } - o.genAndSendOTP(4) + smsOTP.genAndSendOTP(4) fmt.Println("") emailOTP := &Email{} - o = Otp{ + emailOTP.Otp = Otp{ iOtp: emailOTP, } - o.genAndSendOTP(4) + emailOTP.genAndSendOTP(4) }