Comments (12)
我這邊測試的專案修好他了,問題不是簡訊太長,是這裡的 pattern 有問題 (下面是我改完的)
func parseMessageResponse(body io.Reader) (*MessageResponse, error) {
return parseMessageResponseByPattern(`^\[(.+?)\]$`, body)
}
因為不是大家都用數字當 ClientID
(我用 uuid)
然後因為他沒抓到東西所以導致這段沒執行
if matched, _ := regexp.MatchString(pattern, text); matched {
result = new(MessageResult)
response.Results = append(response.Results, result)
}
才會造成他在填資料的時候那個目標 <nil>
導致 panic
from go-mitake.
對了三竹給我的網址是 https://smsapi.mitake.com.tw
我有先 NewClient
然後把裡面的兩個網址換掉
from go-mitake.
印象中是三竹新版的 API,但還我沒測試過 XD
ref minchao/mitake-php#5 (comment)
from go-mitake.
@minchao 那你需要文件嗎 XD
不然我晚點對一下改一下再 PR 看看
from go-mitake.
謝謝
引入對 v2 API 支援,可能需考慮對當前 v1 用戶的相容,初步想到有兩種作法:
- 透過一層 service 包裝來支援 v2,範例
- 使用 Go Modules version 來區分版本,範例
from go-mitake.
看來光改 path
沒用
還是得修其他地方
from go-mitake.
@bestpika 謝謝,可以麻煩您協助 PR 修正嗎?😃
from go-mitake.
@minchao 等我測完確定都沒問題再一起弄上去
from go-mitake.
@minchao 我想問一下你之前參考的文件是幾版的?
或者可以提供給我對照一下
from go-mitake.
@bestpika v1.98, email?
from go-mitake.
@minchao 我發現問題在哪了,我昨天只有改長簡訊
但實際上現在不是分長短簡訊,而是分單筆或多筆簡訊,所以單筆的 batch 會有問題
from go-mitake.
我分兩段,先把那個 panic 修掉
然後再弄個 v2
from go-mitake.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-mitake.