(cmd *cobra.Command, args []string)
| 24 | } |
| 25 | |
| 26 | func generateSession(cmd *cobra.Command, args []string) { |
| 27 | loginType, _ := cmd.Flags().GetString("login-type") |
| 28 | apiId, _ := cmd.Flags().GetInt32("api-id") |
| 29 | apiHash, _ := cmd.Flags().GetString("api-hash") |
| 30 | if loginType == "qr" { |
| 31 | qrlogin.GenerateQRSession(int(apiId), apiHash) |
| 32 | } else if loginType == "phone" { |
| 33 | generatePhoneSession() |
| 34 | } else { |
| 35 | fmt.Println("Invalid login type. Please use either 'qr' or 'phone'") |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func generatePhoneSession() { |
| 40 | fmt.Println("Phone session is not implemented yet.") |
nothing calls this directly
no test coverage detected