並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 2 件 / 2件

新着順 人気順

リロードの検索結果1 - 2 件 / 2件

  • Reload Super Compilation

    Nearly 10 minutes of reloads! Wow! Enjoy

      Reload Super Compilation
    • 【go】webアプリでサーバーを止めずにconfigファイルをリロードする - Qiita

      やりたいこと webサーバー起動時にconfigファイルを読み込んでstructに入れていたが、 これだとconfigファイルに変更があった場合プロセスを再起動する必要がある。 そうではなく、変更があった場合はプロセスを止めずに自動でリロードするようにしたい。 方法 fsnotifyというライブラリを使う。 ファイルの変更などを検知してくれるので、変更がった場合に再度読み込むようにする。 ソース package main import ( "github.com/BurntSushi/toml" "github.com/fsnotify/fsnotify" "github.com/gin-gonic/gin" ) type Config struct { Name string Age int } const File = "./config.toml" var config Config

        【go】webアプリでサーバーを止めずにconfigファイルをリロードする - Qiita
      1