WebSocket を Golang でどうやったらいいか試してみた / WebSocket Test with Golang and Javascript

Chat サーバーを作ってみた…こぴぺしてみた

main.go:

websocket.js:

index.html:

See

  • https://qiita.com/m0a/items/f6405bc29073a7609050
  • https://stackoverflow.com/questions/30686655/go-program-throwing-error-cannot-find-package-code-google-com-p-go-net-websocke
  • https://qiita.com/nekozuki_twt/items/82974d54db71ee12a5e7
  • https://ashitani.jp/golangtips/tips_time.html

 

mb_convert_kana PHP function to Go

とりあえずやってみる…

mb/define.go:

mb/convert-kana.go:

 

golang zserge/lorca で pdf, png 出力してみる / output pdf, png with golang zserge/lorca

Windows 用 GUI module “lxn/walk” を使用したソフトウェアを linux 上 Golang でクロスビルドしてみる / Cross-build to Windows GUI software using module “lxn/walk” with Golang on Linux

環境

Install MinGW

Download and Setting

ダウンロードした go は ~/golang/ に展開
開発は ~/go/ で行う
.bashrc:

モジュールのインストール

hello-walk.go そのまんま使用:

マニフェスト

下記のマニフェストは <trustInfo> セクションを付けてあり
管理者権限での実行用にしてある

Linux では Windows のユーザーアカウント制御 (UAC; User Account Control) 関係ないので通常のユーザーで実行です

hello-walk.manifest:

ビルド

32bit 用の場合は amd64386 に変える

wine のアップデート

して動作した

See

  • https://golang.org/
  • https://github.com/lxn/walk
  • https://pod.hatenablog.com/entry/2018/12/26/074944
  • https://tecadmin.net/install-wine-on-ubuntu/