301 lines
7.3 KiB
HTML
301 lines
7.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="">
|
|
<meta name="theme-color" content="#FFFFFF">
|
|
<meta name="color-scheme" content="light dark"><meta property="og:title" content="golang" />
|
|
<meta property="og:description" content="" />
|
|
<meta property="og:type" content="website" />
|
|
<meta property="og:url" content="https://blog.echosec.top/epic-awesome-gamer/tags/golang/" />
|
|
|
|
<title>golang | Epic 免费人</title>
|
|
<link rel="manifest" href="/epic-awesome-gamer/manifest.json">
|
|
<link rel="icon" href="/epic-awesome-gamer/favicon.png" type="image/x-icon">
|
|
<link rel="stylesheet" href="/epic-awesome-gamer/book.min.31cccedbc2b6812eb37d0d37cdf4cb30cb89bd41421d3d51da624e11baccfe92.css" integrity="sha256-MczO28K2gS6zfQ03zfTLMMuJvUFCHT1R2mJOEbrM/pI=" crossorigin="anonymous">
|
|
<script defer src="/epic-awesome-gamer/flexsearch.min.js"></script>
|
|
<script defer src="/epic-awesome-gamer/en.search.min.29376e9f40a2395f81355c89199d51cebfa619adc77d7a286e33659b38c14e2e.js" integrity="sha256-KTdun0CiOV+BNVyJGZ1Rzr+mGa3HfXoobjNlmzjBTi4=" crossorigin="anonymous"></script>
|
|
|
|
<script defer src="/epic-awesome-gamer/sw.min.fce957f404884887d3e2471bff9b46e9879d096ba64fd4ac8f550d0dd48d105a.js" integrity="sha256-/OlX9ASISIfT4kcb/5tG6YedCWumT9Ssj1UNDdSNEFo=" crossorigin="anonymous"></script>
|
|
<link rel="alternate" type="application/rss+xml" href="https://blog.echosec.top/epic-awesome-gamer/tags/golang/index.xml" title="Epic 免费人" />
|
|
<!--
|
|
Made with Book Theme
|
|
https://github.com/alex-shpak/hugo-book
|
|
-->
|
|
|
|
</head>
|
|
<body dir="ltr">
|
|
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
|
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
|
<main class="container flex">
|
|
<aside class="book-menu">
|
|
<div class="book-menu-content">
|
|
|
|
<nav>
|
|
<h2 class="book-brand">
|
|
<a class="flex align-center" href="/epic-awesome-gamer/"><span>Epic 免费人</span>
|
|
</a>
|
|
</h2>
|
|
|
|
|
|
<div class="book-search">
|
|
<input type="text" id="book-search-input" placeholder="Search" aria-label="Search" maxlength="64" data-hotkeys="s/" />
|
|
<div class="book-search-spinner hidden"></div>
|
|
<ul id="book-search-results"></ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul class="book-languages">
|
|
<li>
|
|
<input type="checkbox" id="languages" class="toggle" />
|
|
<label for="languages" class="flex justify-between">
|
|
<a role="button" class="flex align-center">
|
|
<img src="/epic-awesome-gamer/svg/translate.svg" class="book-icon" alt="Languages" />
|
|
English
|
|
</a>
|
|
</label>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://blog.echosec.top/epic-awesome-gamer/zh/">
|
|
简体中文
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
<a href="https://blog.echosec.top" target="_blank" rel="noopener">
|
|
Blog
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://github.com/QIN2DIM/epic-awesome-gamer/" target="_blank" rel="noopener">
|
|
GitHub
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://github.com/QIN2DIM/epic-awesome-gamer/issues" target="_blank" rel="noopener">
|
|
Discussions
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a href="https://t.me/joinchat/HlB9SQJubb5VmNU5" target="_blank" rel="noopener">
|
|
TG Studio
|
|
</a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<script>(function(){var a=document.querySelector("aside .book-menu-content");addEventListener("beforeunload",function(b){localStorage.setItem("menu.scrollTop",a.scrollTop)}),a.scrollTop=localStorage.getItem("menu.scrollTop")})()</script>
|
|
|
|
|
|
|
|
</div>
|
|
</aside>
|
|
|
|
<div class="book-page">
|
|
<header class="book-header">
|
|
|
|
<div class="flex align-center justify-between">
|
|
<label for="menu-control">
|
|
<img src="/epic-awesome-gamer/svg/menu.svg" class="book-icon" alt="Menu" />
|
|
</label>
|
|
|
|
<strong>golang</strong>
|
|
|
|
<label for="toc-control">
|
|
|
|
</label>
|
|
</div>
|
|
<link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
|
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
<article class="markdown book-post">
|
|
<h2>
|
|
<a href="/epic-awesome-gamer/posts/goisforlovers/">(Hu)go Template Primer</a>
|
|
</h2>
|
|
|
|
<h5>April 2, 2014</h5>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<a href="/epic-awesome-gamer/categories/Development/">Development</a>,
|
|
<a href="/epic-awesome-gamer/categories/golang/">golang</a>
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<a href="/epic-awesome-gamer/tags/go/">go</a>,
|
|
<a href="/epic-awesome-gamer/tags/golang/">golang</a>,
|
|
<a href="/epic-awesome-gamer/tags/templates/">templates</a>,
|
|
<a href="/epic-awesome-gamer/tags/themes/">themes</a>,
|
|
<a href="/epic-awesome-gamer/tags/development/">development</a>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<p>Hugo uses the excellent Go html/template library for its template engine. It is an extremely lightweight engine that provides a very small amount of logic. In our experience that it is just the right amount of logic to be able to create a good static website. If you have used other template systems from different languages or frameworks you will find a lot of similarities in Go templates.
|
|
This document is a brief primer on using Go templates.
|
|
<a href="/epic-awesome-gamer/posts/goisforlovers/">...</a>
|
|
|
|
</p>
|
|
</article>
|
|
|
|
<article class="markdown book-post">
|
|
<h2>
|
|
<a href="/epic-awesome-gamer/posts/hugoisforlovers/">Getting Started with Hugo</a>
|
|
</h2>
|
|
|
|
<h5>April 2, 2014</h5>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<a href="/epic-awesome-gamer/categories/Development/">Development</a>,
|
|
<a href="/epic-awesome-gamer/categories/golang/">golang</a>
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<a href="/epic-awesome-gamer/tags/go/">go</a>,
|
|
<a href="/epic-awesome-gamer/tags/golang/">golang</a>,
|
|
<a href="/epic-awesome-gamer/tags/hugo/">hugo</a>,
|
|
<a href="/epic-awesome-gamer/tags/development/">development</a>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<p>Step 1. Install Hugo
|
|
#
|
|
|
|
Go to Hugo releases and download the appropriate version for your OS and architecture.
|
|
Save it somewhere specific as we will be using it in the next step.
|
|
More complete instructions are available at Install Hugo
|
|
Step 2. Build the Docs
|
|
#
|
|
|
|
Hugo has its own example site which happens to also be the documentation site you are reading right now.
|
|
Follow the following steps:
|
|
<a href="/epic-awesome-gamer/posts/hugoisforlovers/">...</a>
|
|
|
|
</p>
|
|
</article>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<footer class="book-footer">
|
|
|
|
<div class="flex flex-wrap justify-between">
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>(function(){function a(c){const a=window.getSelection(),b=document.createRange();b.selectNodeContents(c),a.removeAllRanges(),a.addRange(b)}document.querySelectorAll("pre code").forEach(b=>{b.addEventListener("click",function(c){a(b.parentElement),navigator.clipboard&&navigator.clipboard.writeText(b.parentElement.textContent)})})})()</script>
|
|
|
|
|
|
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
|
|
|
|
<label for="menu-control" class="hidden book-menu-overlay"></label>
|
|
</div>
|
|
|
|
|
|
</main>
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|