<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>stakiran</author_name>
  <author_url>https://blog.hatena.ne.jp/stakiran/</author_url>
  <blog_title>stamemo</blog_title>
  <blog_url>https://stakiran.hatenablog.com/</blog_url>
  <categories>
    <anon>Golang</anon>
    <anon>Windows</anon>
  </categories>
  <description>たとえば hoge.ini というコマンドラインを与えると、Windows であれば「ini に関連付けられたテキストエディタ」で開いてくれる。しかし Golang の exec.Command() では開いてくれない。さあどうする？ ini ファイルを何で開くかを明示的に与える？ もっとスマートな解があった ini ファイルを何で開くかを明示的に与える？ 一般論として、お使いのエディタに ini ファイルパスを指定したコマンドラインを実行すれば良い。でも「お使いのエディタ」はどうやって取得する？まさか関連付けの仕組み(assoc コマンドやらレジストリやら)を愚直に辿らねばならないというのか…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fstakiran.hatenablog.com%2Fentry%2F2019%2F08%2F19%2F191746&quot; title=&quot;Golang で指定ファイルを関連付けで開く on Windows - stamemo&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-08-19 19:17:46</published>
  <title>Golang で指定ファイルを関連付けで開く on Windows</title>
  <type>rich</type>
  <url>https://stakiran.hatenablog.com/entry/2019/08/19/191746</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
