Documentation ¶
Overview ¶
Package octicon provides GitHub Octicons.
Example ¶
package main import ( "io" "log" "os" "github.com/shurcooL/octicon" "golang.org/x/net/html" ) func main() { var w io.Writer = os.Stdout // Or, e.g., http.ResponseWriter in your HTTP handler, etc. err := html.Render(w, octicon.Alert()) if err != nil { log.Fatalln(err) } }
Output: <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" style="fill: currentColor; vertical-align: top;"><path d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 000 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 00.01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg>
Index ¶
- func Alert() *html.Node
- func Archive() *html.Node
- func ArrowBoth() *html.Node
- func ArrowDown() *html.Node
- func ArrowLeft() *html.Node
- func ArrowRight() *html.Node
- func ArrowSmallDown() *html.Node
- func ArrowSmallLeft() *html.Node
- func ArrowSmallRight() *html.Node
- func ArrowSmallUp() *html.Node
- func ArrowUp() *html.Node
- func Beaker() *html.Node
- func Bell() *html.Node
- func Bold() *html.Node
- func Book() *html.Node
- func Bookmark() *html.Node
- func Briefcase() *html.Node
- func Broadcast() *html.Node
- func Browser() *html.Node
- func Bug() *html.Node
- func Calendar() *html.Node
- func Check() *html.Node
- func Checklist() *html.Node
- func ChevronDown() *html.Node
- func ChevronLeft() *html.Node
- func ChevronRight() *html.Node
- func ChevronUp() *html.Node
- func CircleSlash() *html.Node
- func CircuitBoard() *html.Node
- func Clippy() *html.Node
- func Clock() *html.Node
- func CloudDownload() *html.Node
- func CloudUpload() *html.Node
- func Code() *html.Node
- func Comment() *html.Node
- func CommentDiscussion() *html.Node
- func CreditCard() *html.Node
- func Dash() *html.Node
- func Dashboard() *html.Node
- func Database() *html.Node
- func Dependent() *html.Node
- func DesktopDownload() *html.Node
- func DeviceCamera() *html.Node
- func DeviceCameraVideo() *html.Node
- func DeviceDesktop() *html.Node
- func DeviceMobile() *html.Node
- func Diff() *html.Node
- func DiffAdded() *html.Node
- func DiffIgnored() *html.Node
- func DiffModified() *html.Node
- func DiffRemoved() *html.Node
- func DiffRenamed() *html.Node
- func Ellipsis() *html.Node
- func Eye() *html.Node
- func EyeClosed() *html.Node
- func File() *html.Node
- func FileBinary() *html.Node
- func FileCode() *html.Node
- func FileDirectory() *html.Node
- func FileMedia() *html.Node
- func FilePdf() *html.Node
- func FileSubmodule() *html.Node
- func FileSymlinkDirectory() *html.Node
- func FileSymlinkFile() *html.Node
- func FileZip() *html.Node
- func Flame() *html.Node
- func Fold() *html.Node
- func FoldDown() *html.Node
- func FoldUp() *html.Node
- func Gear() *html.Node
- func Gift() *html.Node
- func Gist() *html.Node
- func GistSecret() *html.Node
- func GitBranch() *html.Node
- func GitCommit() *html.Node
- func GitCompare() *html.Node
- func GitHubAction() *html.Node
- func GitMerge() *html.Node
- func GitPullRequest() *html.Node
- func Globe() *html.Node
- func Grabber() *html.Node
- func Graph() *html.Node
- func Heart() *html.Node
- func History() *html.Node
- func Home() *html.Node
- func HorizontalRule() *html.Node
- func Hubot() *html.Node
- func Icon(name string) *html.Node
- func Inbox() *html.Node
- func Info() *html.Node
- func IssueClosed() *html.Node
- func IssueOpened() *html.Node
- func IssueReopened() *html.Node
- func Italic() *html.Node
- func Jersey() *html.Node
- func KebabHorizontal() *html.Node
- func KebabVertical() *html.Node
- func Key() *html.Node
- func Keyboard() *html.Node
- func Law() *html.Node
- func LightBulb() *html.Node
- func Link() *html.Node
- func LinkExternal() *html.Node
- func ListOrdered() *html.Node
- func ListUnordered() *html.Node
- func Location() *html.Node
- func Lock() *html.Node
- func LogoGist() *html.Node
- func LogoGitHub() *html.Node
- func Mail() *html.Node
- func MailRead() *html.Node
- func MarkGitHub() *html.Node
- func Markdown() *html.Node
- func Megaphone() *html.Node
- func Mention() *html.Node
- func Milestone() *html.Node
- func Mirror() *html.Node
- func MortarBoard() *html.Node
- func Mute() *html.Node
- func NoNewline() *html.Node
- func Note() *html.Node
- func Octoface() *html.Node
- func Organization() *html.Node
- func Package() *html.Node
- func Paintcan() *html.Node
- func Pencil() *html.Node
- func Person() *html.Node
- func Pin() *html.Node
- func Play() *html.Node
- func Plug() *html.Node
- func Plus() *html.Node
- func PlusSmall() *html.Node
- func PrimitiveDot() *html.Node
- func PrimitiveDotStroke() *html.Node
- func PrimitiveSquare() *html.Node
- func Project() *html.Node
- func Pulse() *html.Node
- func Question() *html.Node
- func Quote() *html.Node
- func RSS() *html.Node
- func RadioTower() *html.Node
- func Reply() *html.Node
- func Repo() *html.Node
- func RepoClone() *html.Node
- func RepoForcePush() *html.Node
- func RepoForked() *html.Node
- func RepoPull() *html.Node
- func RepoPush() *html.Node
- func RepoTemplate() *html.Node
- func RepoTemplatePrivate() *html.Node
- func Report() *html.Node
- func RequestChanges() *html.Node
- func Rocket() *html.Node
- func Ruby() *html.Node
- func Saved() *html.Node
- func ScreenFull() *html.Node
- func ScreenNormal() *html.Node
- func Search() *html.Node
- func Server() *html.Node
- func SetSize(icon *html.Node, size int) *html.Node
- func Settings() *html.Node
- func Shield() *html.Node
- func ShieldCheck() *html.Node
- func ShieldLock() *html.Node
- func ShieldX() *html.Node
- func SignIn() *html.Node
- func SignOut() *html.Node
- func Skip() *html.Node
- func Smiley() *html.Node
- func Squirrel() *html.Node
- func Star() *html.Node
- func Stop() *html.Node
- func Sync() *html.Node
- func Tag() *html.Node
- func Tasklist() *html.Node
- func Telescope() *html.Node
- func Terminal() *html.Node
- func TextSize() *html.Node
- func ThreeBars() *html.Node
- func Thumbsdown() *html.Node
- func Thumbsup() *html.Node
- func Tools() *html.Node
- func Trashcan() *html.Node
- func TriangleDown() *html.Node
- func TriangleLeft() *html.Node
- func TriangleRight() *html.Node
- func TriangleUp() *html.Node
- func Unfold() *html.Node
- func Unmute() *html.Node
- func Unsaved() *html.Node
- func Unverified() *html.Node
- func Verified() *html.Node
- func Versions() *html.Node
- func Watch() *html.Node
- func X() *html.Node
- func Zap() *html.Node
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrowRight ¶
ArrowRight returns an "arrow-right" Octicon SVG node.
func ArrowSmallDown ¶
ArrowSmallDown returns an "arrow-small-down" Octicon SVG node.
func ArrowSmallLeft ¶
ArrowSmallLeft returns an "arrow-small-left" Octicon SVG node.
func ArrowSmallRight ¶
ArrowSmallRight returns an "arrow-small-right" Octicon SVG node.
func ArrowSmallUp ¶
ArrowSmallUp returns an "arrow-small-up" Octicon SVG node.
func ChevronDown ¶
ChevronDown returns an "chevron-down" Octicon SVG node.
func ChevronLeft ¶
ChevronLeft returns an "chevron-left" Octicon SVG node.
func ChevronRight ¶
ChevronRight returns an "chevron-right" Octicon SVG node.
func CircleSlash ¶
CircleSlash returns an "circle-slash" Octicon SVG node.
func CircuitBoard ¶
CircuitBoard returns an "circuit-board" Octicon SVG node.
func CloudDownload ¶
CloudDownload returns an "cloud-download" Octicon SVG node.
func CloudUpload ¶
CloudUpload returns an "cloud-upload" Octicon SVG node.
func CommentDiscussion ¶
CommentDiscussion returns an "comment-discussion" Octicon SVG node.
func CreditCard ¶
CreditCard returns an "credit-card" Octicon SVG node.
func DesktopDownload ¶
DesktopDownload returns an "desktop-download" Octicon SVG node.
func DeviceCamera ¶
DeviceCamera returns an "device-camera" Octicon SVG node.
func DeviceCameraVideo ¶
DeviceCameraVideo returns an "device-camera-video" Octicon SVG node.
func DeviceDesktop ¶
DeviceDesktop returns an "device-desktop" Octicon SVG node.
func DeviceMobile ¶
DeviceMobile returns an "device-mobile" Octicon SVG node.
func DiffIgnored ¶
DiffIgnored returns an "diff-ignored" Octicon SVG node.
func DiffModified ¶
DiffModified returns an "diff-modified" Octicon SVG node.
func DiffRemoved ¶
DiffRemoved returns an "diff-removed" Octicon SVG node.
func DiffRenamed ¶
DiffRenamed returns an "diff-renamed" Octicon SVG node.
func FileBinary ¶
FileBinary returns an "file-binary" Octicon SVG node.
func FileDirectory ¶
FileDirectory returns an "file-directory" Octicon SVG node.
func FileSubmodule ¶
FileSubmodule returns an "file-submodule" Octicon SVG node.
func FileSymlinkDirectory ¶
FileSymlinkDirectory returns an "file-symlink-directory" Octicon SVG node.
func FileSymlinkFile ¶
FileSymlinkFile returns an "file-symlink-file" Octicon SVG node.
func GistSecret ¶
GistSecret returns an "gist-secret" Octicon SVG node.
func GitCompare ¶
GitCompare returns an "git-compare" Octicon SVG node.
func GitHubAction ¶
GitHubAction returns an "github-action" Octicon SVG node.
func GitPullRequest ¶
GitPullRequest returns an "git-pull-request" Octicon SVG node.
func HorizontalRule ¶
HorizontalRule returns an "horizontal-rule" Octicon SVG node.
func Icon ¶
Icon returns the named Octicon SVG node. It returns nil if name is not a valid Octicon symbol name.
func IssueClosed ¶
IssueClosed returns an "issue-closed" Octicon SVG node.
func IssueOpened ¶
IssueOpened returns an "issue-opened" Octicon SVG node.
func IssueReopened ¶
IssueReopened returns an "issue-reopened" Octicon SVG node.
func KebabHorizontal ¶
KebabHorizontal returns an "kebab-horizontal" Octicon SVG node.
func KebabVertical ¶
KebabVertical returns an "kebab-vertical" Octicon SVG node.
func LinkExternal ¶
LinkExternal returns an "link-external" Octicon SVG node.
func ListOrdered ¶
ListOrdered returns an "list-ordered" Octicon SVG node.
func ListUnordered ¶
ListUnordered returns an "list-unordered" Octicon SVG node.
func LogoGitHub ¶
LogoGitHub returns an "logo-github" Octicon SVG node.
func MarkGitHub ¶
MarkGitHub returns an "mark-github" Octicon SVG node.
func MortarBoard ¶
MortarBoard returns an "mortar-board" Octicon SVG node.
func Organization ¶
Organization returns an "organization" Octicon SVG node.
func PrimitiveDot ¶
PrimitiveDot returns an "primitive-dot" Octicon SVG node.
func PrimitiveDotStroke ¶
PrimitiveDotStroke returns an "primitive-dot-stroke" Octicon SVG node.
func PrimitiveSquare ¶
PrimitiveSquare returns an "primitive-square" Octicon SVG node.
func RadioTower ¶
RadioTower returns an "radio-tower" Octicon SVG node.
func RepoForcePush ¶
RepoForcePush returns an "repo-force-push" Octicon SVG node.
func RepoForked ¶
RepoForked returns an "repo-forked" Octicon SVG node.
func RepoTemplate ¶
RepoTemplate returns an "repo-template" Octicon SVG node.
func RepoTemplatePrivate ¶
RepoTemplatePrivate returns an "repo-template-private" Octicon SVG node.
func RequestChanges ¶
RequestChanges returns an "request-changes" Octicon SVG node.
func ScreenFull ¶
ScreenFull returns an "screen-full" Octicon SVG node.
func ScreenNormal ¶
ScreenNormal returns an "screen-normal" Octicon SVG node.
func SetSize ¶
SetSize sets size of icon, and returns a reference to it.
Example ¶
package main import ( "io" "log" "os" "github.com/shurcooL/octicon" "golang.org/x/net/html" ) func main() { var w io.Writer = os.Stdout // Or, e.g., http.ResponseWriter in your HTTP handler, etc. err := html.Render(w, octicon.SetSize(octicon.MarkGitHub(), 24)) if err != nil { log.Fatalln(err) } }
Output: <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16" style="fill: currentColor; vertical-align: top;"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
func ShieldCheck ¶
ShieldCheck returns an "shield-check" Octicon SVG node.
func ShieldLock ¶
ShieldLock returns an "shield-lock" Octicon SVG node.
func TriangleDown ¶
TriangleDown returns an "triangle-down" Octicon SVG node.
func TriangleLeft ¶
TriangleLeft returns an "triangle-left" Octicon SVG node.
func TriangleRight ¶
TriangleRight returns an "triangle-right" Octicon SVG node.
func TriangleUp ¶
TriangleUp returns an "triangle-up" Octicon SVG node.
Types ¶
This section is empty.