maxence-charriere/go-app: A package to build ... - GitHub
文章推薦指數: 80 %
Go-app is a package for building progressive web apps (PWA) with the Go programming language (Golang) and WebAssembly (Wasm). Shaping a UI is done by using ... Skiptocontent {{message}} maxence-charriere / go-app Public Notifications Star 5.6k Fork 261 ApackagetobuildprogressivewebappswithGoprogramminglanguageandWebAssembly. go-app.dev MITLicense 5.6k stars 261 forks Star Notifications Code Issues 31 Pullrequests 7 Actions Projects 0 Wiki Security Insights More Code Issues Pullrequests Actions Projects Wiki Security Insights master Branches Tags Couldnotloadbranches Nothingtoshow Loading {{refName}} default Couldnotloadtags Nothingtoshow {{refName}} default Loading 10 branches 99 tags Code Loading Latestcommit maxence-charriere FixUI(#649) … 7167a6b Dec1,2021 FixUI(#649) *Updatecomponent.go *Updateflow.go *Updateflow.go *Updateshell.go *Updateshell.go *resizeshell *Updateflow.go 7167a6b Gitstats 1,075 commits Files Permalink Failedtoloadlatestcommitinformation. Type Name Latestcommitmessage Committime .circleci V9(#588) Sep22,2021 .github UpdateFUNDING.yml Jun1,2020 docs updatedocsbuildwith Nov11,2021 pkg FixUI(#649) Dec1,2021 .gitattributes Refactorwindowwip Feb9,2018 .gitignore Fixdocssetup Jul9,2020 CODE_OF_CONDUCT.md CreateCODE_OF_CONDUCT.md Feb23,2018 CONTRIBUTING.md Updatereadmecontributorsection(#375) Apr6,2020 LICENSE driverlogic+contextlogic Oct23,2016 README.md fixlinkinreadme(#600) Sep30,2021 go.mod V9(#588) Sep22,2021 go.sum V9(#588) Sep22,2021 makefile Fixreference(#626) Oct25,2021 Viewcode Documentation(builtwithgo-app) Install Declarativesyntax StandardHTTP Gettingstarted Builtwithgo-app Contributors CodeContributors FinancialContributors Individuals Organizations README.md Go-appisapackageforbuildingprogressivewebapps(PWA)withtheGoprogramminglanguage(Golang)andWebAssembly(Wasm). ShapingaUIisdonebyusingadeclarativesyntaxthatcreatesandcomposeHTMLelementsonlybyusingtheGoprograminglanguage. ItusesGoHTTPstandardmodel. Anappcreatedwithgo-appcanoutoftheboxruninitsownwindow,supportsofflinemode,andareSEOfriendly. Documentation(builtwithgo-app) Install go-apprequirements: Go1.17ornewer Gomodule gomodinit goget-ugithub.com/maxence-charriere/go-app/v9/pkg/app Declarativesyntax Go-appusesadeclarativesyntaxsoyoucanwritereusablecomponent-basedUIelementsjustbyusingtheGoprogramminglanguage. HereisaHelloWorldcomponentthattakesaninputanddisplaysitsvalueinitstitle: typehellostruct{ app.Compo namestring } func(h*hello)Render()app.UI{ returnapp.Div().Body( app.H1().Body( app.Text("Hello,"), app.If(h.name!="", app.Text(h.name), ).Else( app.Text("World!"), ), ), app.P().Body( app.Input(). Type("text"). Value(h.name). Placeholder("Whatisyourname?"). AutoFocus(true). OnChange(h.ValueTo(&h.name)), ), ) } StandardHTTP Appscreatedwithgo-appcomplieswithGostandardHTTPpackageinterfaces. funcmain(){ //Componentsrouting: app.Route("/",&hello{}) app.Route("/hello",&hello{}) app.RunWhenOnBrowser() //HTTProuting: http.Handle("/",&app.Handler{ Name:"Hello", Description:"AnHelloWorld!example", }) iferr:=http.ListenAndServe(":8000",nil);err!=nil{ log.Fatal(err) } } Gettingstarted ReadtheGettingStarteddocument. Builtwithgo-app Lofimusic.app Murlok.io liwasc go-appDocs Contributors CodeContributors Thisprojectexiststhankstoallthepeoplewhocontribute.[Contribute]. FinancialContributors Becomeafinancialcontributorandhelpussustaingo-appdevelopment.[Contribute] Individuals Organizations Supportthisprojectwithyourorganization.Yourlogowillshowupherewithalinktoyourwebsite.[Contribute] About ApackagetobuildprogressivewebappswithGoprogramminglanguageandWebAssembly. go-app.dev Topics go golang gui ui pwa wasm awesome-go Resources Readme License MITLicense Codeofconduct Codeofconduct Releases 77 v9.2.1 Latest Nov8,2021 +76releases Sponsorthisproject opencollective.com/go-app LearnmoreaboutGitHubSponsors Packages0 Nopackagespublished Usedby3 @kdevb0x/or-maybe-more @ericsgagnon/go-kube-learning @xiangdong1987/easyGin Contributors19 +8contributors Languages Go 97.9% JavaScript 1.2% Other 0.9% Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.
延伸文章資訊
- 1Golang
Go is an open source programming language that makes it easy to build simple ... and support for ...
- 2分享下使用Golang + React Native开发APP的体验 - 知乎专栏
Golang从1.5版本开始就可以编写android端、ios端的移动应用了,但貌似尝试的人很少最近由于我闲得蛋疼,所以用Golang的写了个看小说的APP,下面说下开发中遇到的事。
- 3Create Your First Golang App - Hackers and Slackers
Set up a local Golang environment and learn the basics to create and publish your first 'Hello wo...
- 4Go 建立一個簡單的web 服務- 使用Golang 打造Web 應用程式
前面小節已經介紹了Web 是基於http 協議的一個服務,Go 語言裡面提供了一個完善的net/http 套件,透過http 套件可以很方便的建立起來一個可以執行的Web 服務。
- 5A Go package for building Progressive Web Apps
A package for building progressive web apps (PWA) with the Go programming language (Golang) and W...