<script src='https://raw.github.com/axx/GolangHighlighter/master/shBrushGo.js' type='text/javascript'/>Then use either "go" or "golang" as alias when you insert golang code on your blog:
<pre class="brush: go">package main
import "fmt"
func main() {
fmt.Printf("yoohoo!")
}</pre>This will be rendered as:package main
import "fmt"
func main() {
fmt.Printf("yoohoo!")
}I hope someone else finds it useful. Please drop a comment if you have some suggestions on how to improve it.EDIT (05AUG2012): I've lost my old server so I had to reconstruct the script and placed it on GitHub. I therefore updated the example and links above.
very useful!
ReplyDeleteCheers
it's out of work. something wrong?
ReplyDeletemust be something to do with github. i got a popup first that the script isn't working, but now it's back. to be safe, you can simply copy it at put it somewhere on your own server :)
ReplyDeleteerrr... it's really not working anymore. i'll have a look later when i get some free time. thanks for the heads up, xiao.
ReplyDeleteIt's great, it works again
ReplyDeleteHi there, I found your blog by the use of Google whilst searching for a comparable topic, your website came up, it seems to be good. I’ve bookmarked it in my google bookmarks.
ReplyDeletewebsite design