Coder Social home page Coder Social logo

Comments (12)

bestpika avatar bestpika commented on July 19, 2024 2

我這邊測試的專案修好他了,問題不是簡訊太長,是這裡的 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.

bestpika avatar bestpika commented on July 19, 2024

對了三竹給我的網址是 https://smsapi.mitake.com.tw
我有先 NewClient 然後把裡面的兩個網址換掉

from go-mitake.

minchao avatar minchao commented on July 19, 2024

印象中是三竹新版的 API,但還我沒測試過 XD

ref minchao/mitake-php#5 (comment)

from go-mitake.

bestpika avatar bestpika commented on July 19, 2024

@minchao 那你需要文件嗎 XD
不然我晚點對一下改一下再 PR 看看

from go-mitake.

minchao avatar minchao commented on July 19, 2024

謝謝

引入對 v2 API 支援,可能需考慮對當前 v1 用戶的相容,初步想到有兩種作法:

from go-mitake.

bestpika avatar bestpika commented on July 19, 2024

看來光改 path 沒用
還是得修其他地方

from go-mitake.

minchao avatar minchao commented on July 19, 2024

@bestpika 謝謝,可以麻煩您協助 PR 修正嗎?😃

from go-mitake.

bestpika avatar bestpika commented on July 19, 2024

@minchao 等我測完確定都沒問題再一起弄上去

from go-mitake.

bestpika avatar bestpika commented on July 19, 2024

@minchao 我想問一下你之前參考的文件是幾版的?
或者可以提供給我對照一下

from go-mitake.

minchao avatar minchao commented on July 19, 2024

@bestpika v1.98, email?

from go-mitake.

bestpika avatar bestpika commented on July 19, 2024

@minchao 我發現問題在哪了,我昨天只有改長簡訊
但實際上現在不是分長短簡訊,而是分單筆或多筆簡訊,所以單筆的 batch 會有問題

from go-mitake.

bestpika avatar bestpika commented on July 19, 2024

我分兩段,先把那個 panic 修掉
然後再弄個 v2

from go-mitake.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.