extism / go-pdk

Extism Plug-in Development Kit (PDK) for Go
https://pkg.go.dev/github.com/extism/go-pdk
BSD 3-Clause "New" or "Revised" License
60 stars 11 forks source link

remove strings package per issue #14 #16

Closed syke99 closed 10 months ago

syke99 commented 1 year ago

this PR removes the strings std package, removing all unicode tables per #14. strings.ToUpper() is now replaced with an HTTPMethod "enum" (iota + map). This list of HTTP methods was reimplemented to prevent pulling in the entire net/http std package just for a few strings.

syke99 commented 1 year ago

one thing to mention, the plugin wasm module in the examples directory will need to be recompiled. I've only currently got a personal Windows machine that's just barely limping along until my replacement laptop comes in 😅

egonelbre commented 1 year ago

I should mention that encoding/json also brings in the unicode tables.

nilslice commented 10 months ago

closing in favor of #23 which incorporates these commits. Thank you!