Software in Go on Windows

polaris · · 953 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi there. I am interested in learning about teams running / maintaining Go software on Windows.</p> <p>What kind of software do you run and what issues do you face ?</p> <p>Those of you that happen to be running the same software on both Linux and Windows what is your development workflow and again what kind of challenges do you face ?</p> <hr/>**评论:**<br/><br/>kardianos: <pre><p>Generally there are no issues / no platform differences between running Go built software on both Linux and Windows. I do it for some business software; I mostly develop on Linux, another dev works on OS X, we deploy to Windows / MS SQL Server as a windows service. Normal command line applications also work fine.</p> <p>Some software does assume platform specific code, especially watch out for cgo packages. But I encounter those rarely.</p></pre>holyjeff: <pre><p>What lib/pkg you use for win service? Kardianos or nssm?</p></pre>kardianos: <pre><p>I use github.com/kardianos/service (but I&#39;m biased, see my handle)</p></pre>frebb: <pre><p>kardianos/service was awesome to work with. Thanks for it!</p></pre>gopher1717: <pre><p>I&#39;m not OP, but I&#39;ve used both and both work fine.</p></pre>Sythe2o0: <pre><p>I&#39;m working on a GUI application for Windows/Linux, and the two issues are A) libraries that I&#39;m using claiming to support both platforms but having obvious bugs with specific platforms and B) libraries I want to use that only support one platform specifically, but these complaints are almost solely due to this being a GUI project.</p></pre>gopher1717: <pre><p>What lib are you using for GUI?</p></pre>Sythe2o0: <pre><p>We&#39;re building an engine on top of <a href="https://godoc.org/golang.org/x/exp/shiny/screen" rel="nofollow">exp/shiny</a>.</p></pre>shovelpost: <pre><blockquote> <p>We&#39;re building an engine on top of exp/shiny.</p> </blockquote> <p>I&#39;d be very interested to see that. Is it open source?</p></pre>Sythe2o0: <pre><p>We&#39;re planning on open sourcing it in the next month-ish. </p> <p>There&#39;s a number of things we want to resolve before we make a public release. We have OK documentation but a good amount of the library needs work. We have very few tests. Everyone who has used the project has used Windows so while we&#39;ve built and run it on linux occasionally there&#39;s a good chance we have obscure linux bugs, and we&#39;ve never run it on osx. </p> <p>That&#39;s not to mention a couple of memory fault bugs that we haven&#39;t nailed down the exact cause of (but we know it has something to do with allocating and then deallocating a lot of memory very quickly, usually seen when using a lot of particle effects).</p></pre>holyjeff: <pre><p>Can you give us a screenshot of what it looks like? Feel free to blur out confidential parts :-)</p></pre>Sythe2o0: <pre><p>What part of it do you want to see? This is a particle demo application that I wrote recently: <a href="https://github.com/200sc/particle-demo/blob/master/demo.go" rel="nofollow">code</a>, <a href="http://imgur.com/a/M1CVa#1HBCljq" rel="nofollow">gif</a></p> <p>This is a text demo: <a href="https://github.com/200sc/rainbow-text/blob/master/core.go" rel="nofollow">code</a>, <a href="http://imgur.com/a/a3uKt" rel="nofollow">gif</a></p> <p>There&#39;s a much larger application with available binaries <a href="https://github.com/200sc/go-compgeo/tree/master/demo" rel="nofollow">here</a>, but the version of oak being used there is a few months old (there&#39;s only one severe bug fixed since then, in that the engine might be cripplingly slow on machines with less than 5 cores) and even the binaries in the package are not up to date with the rest of the package: </p> <p>A game (with binaries) <a href="https://bitbucket.org/StephenPatrick/cliffracers/overview" rel="nofollow">here</a>, even older than the last demo</p> <p><a href="https://gist.github.com/200sc/707ea930a718930499d176fd55ffc6d8" rel="nofollow">Flappy bird</a></p> <p><a href="https://gist.github.com/200sc/6c8e9c1c79f0157bbe6c183164065d22" rel="nofollow">Pong</a> (very old)</p></pre>shovelpost: <pre><p>It looks very cool!</p> <p>How was the experience building on top of the still incomplete <code>exp/shiny</code>?</p></pre>Sythe2o0: <pre><p>Sad, I guess. There&#39;s no one really maintaining shiny and no one&#39;s using it on windows, so there&#39;s been a number of bugs we&#39;ve run into that we had to raise issues to fix, and it looks like the recent work into shiny hasn&#39;t been, say, adding full-screen support or window scaling options or basic window management features but instead work with flex boxes.</p> <p>Shiny also has it&#39;s coordinates completely flipped from what makes sense (quadrant 4 is negative x, negative y), so to draw anything in shiny you need to convert all x and y values to be negative, which is confusing</p></pre>Yojihito: <pre><p>Okay that particle demo application looks cool as hell.</p> <p>Would make a great screensaver (randomized parameters every x seconds).</p></pre>gopher1717: <pre><p>Thanks!</p></pre>JHunz: <pre><p>The software I work on has a primarily Windows userbase. It&#39;s largely been smooth sailing. There have been a few gnarly Windows-specific Go language bugs that popped up, but most of them only affected us because of heavy cgo and Windows API call usage. It&#39;s certainly been the easiest language to work with cross-platform that I&#39;ve ever used.</p></pre>PaluMacil: <pre><p>My team is 100% Windows (26 people) and we generally develop Go or .Net Core under Linux / Docker conditions, so we often run it in Windows a number of times before we make a Dockerfile, and then we&#39;re running it in Docker, but the complexity is almost always from Docker, networking, and databases--not Linux. If you write web, terminal, or database heavy things you&#39;ll see little difference. For gui libraries, game libraries, and hardware control, you&#39;ll see a fair bit more difference.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

953 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传