37 lines
1.3 KiB
HTML
37 lines
1.3 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width">
|
||
|
<title>GoSmartKeyboard</title>
|
||
|
<link rel="stylesheet" href="google-code-prettify/prettify.css">
|
||
|
<link rel="stylesheet" href="styles/prettify-theme.css">
|
||
|
<script defer src="google-code-prettify/prettify.js"></script>
|
||
|
<script defer src="google-code-prettify/run_prettify.js"></script>
|
||
|
<link rel="stylesheet" href="styles/main.css">
|
||
|
</head>
|
||
|
|
||
|
<!-- Generated by srcweave https://github.com/justinmeiners/srcweave -->
|
||
|
<h1>Miscelanious plumbing functions<a id="c12"></a></h1>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h2>1. Detect version command, print version, and exit<a id="s12:0"></a></h2>
|
||
|
|
||
|
|
||
|
|
||
|
<div class="code-block">
|
||
|
<span class="block-header">
|
||
|
<strong class="block-title"><em><a id="handle-version-command-block-42" href="#handle-version-command-block-42">handle version command</a></em></strong></span>
|
||
|
<pre class="prettyprint"><code class="">if len(os.Args) > 1 && os.Args[1] == "version" {
|
||
|
fmt.Println("Keyboard version: <em class="block-link nocode" title="index.html"><a href="ReadMe.html#version-block-1">@{version}</a></em>")
|
||
|
os.Exit(0)
|
||
|
}
|
||
|
</code></pre>
|
||
|
<p class="block-usages"><small>Used by <a href="Server.html#entrypoint-block-45" title="entrypoint. Server.html">1</a> </small></p></div>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|