├── .gitignore ├── LICENSE ├── README.md ├── README_ZH.md ├── _syso ├── favicon.ico ├── favicon.manifest ├── favicon.png ├── favicon.syso ├── index.css ├── index.html ├── jquery.githubRepoWidget2.js ├── jquery.min.js ├── jquery.min.map └── syso.go ├── acceptencoder ├── acceptencoder.go └── acceptencoder_test.go ├── apidoc.go ├── apiware ├── .gitignore ├── LICENSE ├── README.md ├── apiware.go ├── convert.go ├── doc.go ├── error.go ├── param.go ├── param_test.go ├── paramapi.go ├── paramapi_test.go ├── util.go └── util_test.go ├── config.go ├── config_test.go ├── context.go ├── context_input.go ├── context_output.go ├── doc.go ├── doc ├── MultiUsage.png ├── apidoc.png ├── faygo_48x48.ico ├── faygo_96x96.png ├── index.png └── server.png ├── ext ├── barcode │ ├── LICENSE │ ├── README.md │ ├── barcode.go │ ├── codabar │ │ ├── encoder.go │ │ └── encoder_test.go │ ├── code128 │ │ ├── encode.go │ │ ├── encode_test.go │ │ └── encodingtable.go │ ├── code39 │ │ └── encoder.go │ ├── datamatrix │ │ ├── codelayout.go │ │ ├── codesize.go │ │ ├── datamatrixcode.go │ │ ├── encoder.go │ │ ├── errorcorrection.go │ │ └── errorcorrection_test.go │ ├── ean │ │ ├── encoder.go │ │ └── encoder_test.go │ ├── qr │ │ ├── alphanumeric.go │ │ ├── alphanumeric_test.go │ │ ├── automatic.go │ │ ├── automatic_test.go │ │ ├── blocks.go │ │ ├── blocks_test.go │ │ ├── encoder.go │ │ ├── encoder_test.go │ │ ├── errorcorrection.go │ │ ├── errorcorrection_test.go │ │ ├── helper.go │ │ ├── numeric.go │ │ ├── numeric_test.go │ │ ├── qrcode.go │ │ ├── qrcode_test.go │ │ ├── unicode.go │ │ ├── unicode_test.go │ │ ├── versioninfo.go │ │ └── versioninfo_test.go │ ├── scaledbarcode.go │ ├── twooffive │ │ ├── encoder.go │ │ └── encoder_test.go │ └── utils │ │ ├── base1dcode.go │ │ ├── bitlist.go │ │ ├── galoisfield.go │ │ ├── galoisfield_test.go │ │ ├── gfpoly.go │ │ ├── runeint.go │ │ └── runeint_test.go ├── bitconv │ ├── bitconv.go │ └── bitconv_test.go ├── cron │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── constantdelay.go │ ├── constantdelay_test.go │ ├── cron.go │ ├── cron_test.go │ ├── doc.go │ ├── parser.go │ ├── parser_test.go │ ├── spec.go │ └── spec_test.go ├── db │ ├── directsql │ │ ├── README.md │ │ ├── checkparameter.go │ │ ├── resultcache.go │ │ ├── snowflake.go │ │ ├── sqlcontext.go │ │ ├── sqlengine.go │ │ ├── sqlhandle.go │ │ ├── sqlhelper.go │ │ ├── sqlmanage.go │ │ ├── sqlrouter.go │ │ ├── sqlservice.go │ │ └── sqlwatcher.go │ ├── directsqlx │ │ ├── README.md │ │ ├── checkparameter.go │ │ ├── resultcache.go │ │ ├── sqlcontext.go │ │ ├── sqlengine.go │ │ ├── sqlhandle.go │ │ ├── sqlhelper.go │ │ ├── sqlmanage.go │ │ ├── sqlrouter.go │ │ ├── sqlservice.go │ │ └── sqlwatcher.go │ ├── gorm │ │ ├── config.go │ │ ├── config_test.go │ │ ├── helper.go │ │ └── service.go │ ├── sqlx │ │ ├── config.go │ │ ├── config_test.go │ │ ├── helper.go │ │ └── service.go │ └── xorm │ │ ├── config.go │ │ ├── config_test.go │ │ ├── helper.go │ │ ├── logger.go │ │ └── service.go ├── middleware │ ├── attachment.go │ ├── cross_origin.go │ ├── html_suffix.go │ ├── ip_filter.go │ └── jwt │ │ ├── jwt.go │ │ └── sample │ │ ├── config │ │ ├── __global___.ini │ │ └── jwt-test.ini │ │ ├── log │ │ └── app.pid │ │ ├── run.http │ │ └── server.go ├── otp │ ├── .travis.yml │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── doc.go │ ├── example │ │ └── main.go │ ├── hotp │ │ ├── hotp.go │ │ └── hotp_test.go │ ├── otp.go │ ├── otp_test.go │ └── totp │ │ ├── totp.go │ │ └── totp_test.go ├── surfer │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── README_ZH.md │ ├── agent.go │ ├── agent_bsd.go │ ├── agent_linux.go │ ├── agent_linux_arm.go │ ├── agent_windows.go │ ├── body.go │ ├── example │ │ └── example.go │ ├── phantom.go │ ├── request.go │ ├── surf.go │ ├── surfer.go │ ├── surfer_test.go │ └── util.go ├── task │ ├── README.md │ └── task.go ├── uuid │ ├── dce.go │ ├── doc.go │ ├── hash.go │ ├── json_test.go │ ├── marshal.go │ ├── node.go │ ├── seq_test.go │ ├── sql.go │ ├── sql_test.go │ ├── time.go │ ├── util.go │ ├── uuid.go │ ├── uuid_test.go │ ├── version1.go │ └── version4.go └── websocket │ ├── .gitignore │ ├── .travis.yml │ ├── AUTHORS │ ├── LICENSE │ ├── README.md │ ├── client.go │ ├── client_server_test.go │ ├── client_test.go │ ├── compression.go │ ├── compression_test.go │ ├── conn.go │ ├── conn_read.go │ ├── conn_read_legacy.go │ ├── conn_test.go │ ├── doc.go │ ├── example_test.go │ ├── examples │ ├── autobahn │ │ ├── README.md │ │ ├── fuzzingclient.json │ │ └── server.go │ ├── chat │ │ ├── README.md │ │ ├── client.go │ │ ├── home.html │ │ ├── hub.go │ │ └── main.go │ ├── command │ │ ├── README.md │ │ ├── home.html │ │ └── main.go │ ├── echo │ │ ├── README.md │ │ ├── client.go │ │ └── server.go │ └── filewatch │ │ ├── README.md │ │ └── main.go │ ├── helper.go │ ├── json.go │ ├── json_test.go │ ├── mask.go │ ├── mask_test.go │ ├── server.go │ ├── server_test.go │ ├── util.go │ └── util_test.go ├── faygo.go ├── faygo_test.go ├── framework.go ├── freecache ├── LICENSE ├── README.md ├── cache.go ├── cache_test.go ├── murmur3 │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── murmur.go │ ├── murmur128.go │ ├── murmur32.go │ ├── murmur64.go │ └── murmur_test.go ├── ringbuf.go ├── ringbuf_test.go ├── segment.go └── server │ └── main.go ├── fs.go ├── go.mod ├── go.sum ├── graceful_a.go ├── graceful_b.go ├── gracenet ├── net.go └── net_test.go ├── handler.go ├── helper.go ├── helper_test.go ├── log.go ├── log └── app.pid ├── logging ├── CONTRIBUTORS ├── LICENSE ├── README.md ├── backend.go ├── color │ ├── color.go │ ├── colorable_others.go │ ├── colorable_windows.go │ ├── isatty_appengine.go │ ├── isatty_bsd.go │ ├── isatty_linux.go │ ├── isatty_solaris.go │ └── isatty_windows.go ├── console.go ├── console_test.go ├── example_test.go ├── examples │ ├── example.go │ └── example.png ├── file.go ├── file_test.go ├── format.go ├── format_test.go ├── level.go ├── level_test.go ├── logger.go ├── logger_test.go ├── memory.go ├── memory_test.go ├── multi.go └── multi_test.go ├── markdown ├── LICENSE.txt ├── README.md ├── block.go ├── block_test.go ├── github.css.go ├── github.go ├── html.go ├── inline.go ├── inline_test.go ├── latex.go ├── markdown.go ├── ref_test.go └── smartypants.go ├── mime.go ├── muxapi.go ├── pongo2 ├── .gitignore ├── .travis.yml ├── AUTHORS ├── LICENSE ├── README.md ├── context.go ├── doc.go ├── docs │ ├── examples.md │ ├── filters.md │ ├── index.md │ ├── macros.md │ ├── tags.md │ ├── template_sets.md │ ├── write_filters.md │ └── write_tags.md ├── error.go ├── filters.go ├── filters_builtin.go ├── helpers.go ├── lexer.go ├── nodes.go ├── nodes_html.go ├── nodes_wrapper.go ├── parser.go ├── parser_document.go ├── parser_expression.go ├── pongo2.go ├── pongo2_template_test.go ├── pongo2_test.go ├── tags.go ├── tags_autoescape.go ├── tags_block.go ├── tags_comment.go ├── tags_cycle.go ├── tags_extends.go ├── tags_filter.go ├── tags_firstof.go ├── tags_for.go ├── tags_if.go ├── tags_ifchanged.go ├── tags_ifequal.go ├── tags_ifnotequal.go ├── tags_import.go ├── tags_include.go ├── tags_lorem.go ├── tags_macro.go ├── tags_now.go ├── tags_set.go ├── tags_spaceless.go ├── tags_ssi.go ├── tags_templatetag.go ├── tags_widthratio.go ├── tags_with.go ├── template.go ├── template_loader.go ├── template_sets.go ├── template_tests │ ├── autoescape.tpl │ ├── autoescape.tpl.out │ ├── base_dir_test │ │ ├── base.html │ │ └── subdir │ │ │ ├── include.html │ │ │ ├── index.html │ │ │ └── ssi.html │ ├── comment.tpl │ ├── comment.tpl.out │ ├── complex.tpl │ ├── complex.tpl.out │ ├── cycle.tpl │ ├── cycle.tpl.out │ ├── empty.tpl │ ├── empty.tpl.out │ ├── expressions.tpl │ ├── expressions.tpl.out │ ├── extends.tpl │ ├── extends.tpl.out │ ├── extends_super.tpl │ ├── extends_super.tpl.out │ ├── extends_super2.tpl │ ├── extends_super2.tpl.out │ ├── filters-compilation.err │ ├── filters-compilation.err.out │ ├── filters-execution.err │ ├── filters-execution.err.out │ ├── filters.tpl │ ├── filters.tpl.out │ ├── firstof.tpl │ ├── firstof.tpl.out │ ├── for.tpl │ ├── for.tpl.out │ ├── function_calls_wrapper.tpl │ ├── function_calls_wrapper.tpl.out │ ├── if.tpl │ ├── if.tpl.out │ ├── ifchanged.tpl │ ├── ifchanged.tpl.out │ ├── includes.helper │ ├── includes.tpl │ ├── includes.tpl.out │ ├── inheritance │ │ ├── base.tpl │ │ ├── base2.tpl │ │ ├── cycle_include.tpl │ │ └── inheritance2 │ │ │ └── skeleton.tpl │ ├── issues.tpl │ ├── issues.tpl.out │ ├── lorem.tpl │ ├── lorem.tpl.out │ ├── macro-compilation.err │ ├── macro-compilation.err.out │ ├── macro-execution.err │ ├── macro-execution.err.out │ ├── macro.helper │ ├── macro.tpl │ ├── macro.tpl.out │ ├── macro2.helper │ ├── now.tpl │ ├── now.tpl.out │ ├── pongo2ctx.tpl │ ├── pongo2ctx.tpl.out │ ├── sandbox-compilation.err │ ├── sandbox-compilation.err.out │ ├── sandbox.tpl │ ├── sandbox.tpl.out │ ├── set.tpl │ ├── set.tpl.out │ ├── spaceless.tpl │ ├── spaceless.tpl.out │ ├── ssi.helper │ ├── ssi.tpl │ ├── ssi.tpl.out │ ├── tag_filter.tpl │ ├── tag_filter.tpl.out │ ├── tags-compilation.err │ ├── tags-compilation.err.out │ ├── template_sets.tpl │ ├── template_sets.tpl.out │ ├── templatetag.tpl │ ├── templatetag.tpl.out │ ├── variables-execution.err │ ├── variables-execution.err.out │ ├── variables.tpl │ ├── variables.tpl.out │ ├── verbatim.tpl │ ├── verbatim.tpl.out │ ├── widthratio.tpl │ ├── widthratio.tpl.out │ ├── with.helper │ ├── with.tpl │ └── with.tpl.out ├── value.go └── variable.go ├── render_pongo2.go ├── response_writer.go ├── samples ├── MultiUsage │ ├── config │ │ ├── __global___.ini │ │ ├── myapp_1.0.ini │ │ └── xorm.ini │ ├── main.go │ └── upload │ │ └── henrylee.jpg ├── demo │ ├── clienttest │ │ └── testclient.go │ ├── config │ │ ├── __global___.ini │ │ ├── cert.pem │ │ ├── key.pem │ │ ├── myapp1_1.0.ini │ │ └── myapp2_1.0.ini │ ├── handler │ │ ├── body.go │ │ ├── param.go │ │ ├── proxy.go │ │ ├── render.go │ │ └── websocket.go │ ├── main.go │ ├── middleware │ │ └── index.go │ ├── router │ │ └── router.go │ └── static │ │ ├── cross.html │ │ ├── jQuery-2.1.4.min.js │ │ ├── markdown │ │ ├── README.md │ │ └── README.txt │ │ ├── public │ │ └── index.txt │ │ ├── render.html │ │ ├── renderfs │ │ ├── index.html │ │ └── index.txt │ │ ├── websocket.html │ │ └── websocket.js ├── directsql │ ├── README.MD │ ├── common │ │ └── pongo2func.go │ ├── config │ │ ├── __global___.ini │ │ ├── directsql.ini │ │ ├── directsqldemo_1.0.ini │ │ └── xorm.ini │ ├── handler │ │ └── index.go │ ├── main.go │ ├── model │ │ └── demo.msql │ ├── router │ │ └── router.go │ ├── static │ │ └── jQuery-2.1.4.min.js │ ├── sys_user.sql │ └── view │ │ ├── index.html │ │ └── pongo2.tpl ├── directsqlx │ ├── README.MD │ ├── common │ │ └── pongo2func.go │ ├── config │ │ ├── __global___.ini │ │ ├── directsql.ini │ │ ├── directsqldemo_1.0.ini │ │ └── xorm.ini │ ├── handler │ │ └── index.go │ ├── main.go │ ├── model │ │ └── demo.msql │ ├── router │ │ └── router.go │ ├── static │ │ └── jQuery-2.1.4.min.js │ ├── sys_user.sql │ └── view │ │ ├── index.html │ │ └── pongo2.tpl └── myconfig │ ├── config │ └── __global___.ini │ └── main.go ├── server.go ├── session ├── README.md ├── couchbase │ └── sess_couchbase.go ├── ledis │ └── ledis_session.go ├── memcache │ └── sess_memcache.go ├── mysql │ └── sess_mysql.go ├── postgres │ └── sess_postgresql.go ├── redis │ └── sess_redis.go ├── sess_cookie.go ├── sess_cookie_test.go ├── sess_file.go ├── sess_mem.go ├── sess_mem_test.go ├── sess_test.go ├── sess_utils.go ├── session.go └── ssdb │ └── sess_ssdb.go ├── swagger ├── bindata_assetfs.go ├── bindata_assetfs_usage.go ├── swagger-ui.zip └── swagger.go ├── syso_windows_386.go ├── tree.go ├── tree_test.go └── vendor ├── github.com ├── andeya │ ├── goutil │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── currip.go │ │ ├── doc.go │ │ ├── encrypt.go │ │ ├── errors │ │ │ └── errors.go │ │ ├── file.go │ │ ├── gopath.go │ │ ├── gotest.go │ │ ├── js_url.go │ │ ├── kvdata.go │ │ ├── map.go │ │ ├── other.go │ │ ├── pid_file.go │ │ ├── random.go │ │ ├── sets.go │ │ ├── string.go │ │ ├── targz.go │ │ ├── trace.go │ │ └── type.go │ └── ini │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── README_ZH.md │ │ ├── error.go │ │ ├── helper.go │ │ ├── ini.go │ │ ├── key.go │ │ ├── parser.go │ │ ├── section.go │ │ └── struct.go ├── bradfitz │ └── gomemcache │ │ ├── LICENSE │ │ └── memcache │ │ ├── memcache.go │ │ └── selector.go ├── couchbase │ ├── go-couchbase │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.markdown │ │ ├── audit.go │ │ ├── client.go │ │ ├── conn_pool.go │ │ ├── ddocs.go │ │ ├── observe.go │ │ ├── pools.go │ │ ├── port_map.go │ │ ├── streaming.go │ │ ├── tap.go │ │ ├── upr.go │ │ ├── users.go │ │ ├── util.go │ │ ├── vbmap.go │ │ └── views.go │ ├── gomemcached │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.markdown │ │ ├── client │ │ │ ├── mc.go │ │ │ ├── tap_feed.go │ │ │ ├── transport.go │ │ │ └── upr_feed.go │ │ ├── mc_constants.go │ │ ├── mc_req.go │ │ ├── mc_res.go │ │ └── tap.go │ └── goutils │ │ ├── LICENSE.md │ │ ├── logging │ │ ├── logger.go │ │ └── logger_golog.go │ │ └── scramsha │ │ ├── scramsha.go │ │ └── scramsha_http.go ├── cupcake │ └── rdb │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENCE │ │ ├── README.md │ │ ├── crc64 │ │ └── crc64.go │ │ ├── decoder.go │ │ ├── encoder.go │ │ ├── nopdecoder │ │ └── nop_decoder.go │ │ └── slice_buffer.go ├── davecgh │ └── go-spew │ │ ├── LICENSE │ │ └── spew │ │ ├── bypass.go │ │ ├── bypasssafe.go │ │ ├── common.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── dump.go │ │ ├── format.go │ │ └── spew.go ├── edsrzf │ └── mmap-go │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── mmap.go │ │ ├── mmap_unix.go │ │ └── mmap_windows.go ├── elazarl │ └── go-bindata-assetfs │ │ ├── LICENSE │ │ ├── README.md │ │ ├── assetfs.go │ │ └── doc.go ├── facebookgo │ ├── ensure │ │ ├── .travis.yml │ │ ├── ensure.go │ │ ├── license │ │ └── readme.md │ ├── freeport │ │ ├── .travis.yml │ │ ├── freeport.go │ │ ├── license │ │ ├── patents │ │ └── readme.md │ ├── stack │ │ ├── .travis.yml │ │ ├── license │ │ ├── patents │ │ ├── readme.md │ │ └── stack.go │ └── subset │ │ ├── .travis.yml │ │ ├── license │ │ ├── patents │ │ ├── readme.md │ │ └── subset.go ├── flosch │ └── pongo2 │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── context.go │ │ ├── doc.go │ │ ├── error.go │ │ ├── filters.go │ │ ├── filters_builtin.go │ │ ├── helpers.go │ │ ├── lexer.go │ │ ├── nodes.go │ │ ├── nodes_html.go │ │ ├── nodes_wrapper.go │ │ ├── options.go │ │ ├── parser.go │ │ ├── parser_document.go │ │ ├── parser_expression.go │ │ ├── pongo2.go │ │ ├── tags.go │ │ ├── tags_autoescape.go │ │ ├── tags_block.go │ │ ├── tags_comment.go │ │ ├── tags_cycle.go │ │ ├── tags_extends.go │ │ ├── tags_filter.go │ │ ├── tags_firstof.go │ │ ├── tags_for.go │ │ ├── tags_if.go │ │ ├── tags_ifchanged.go │ │ ├── tags_ifequal.go │ │ ├── tags_ifnotequal.go │ │ ├── tags_import.go │ │ ├── tags_include.go │ │ ├── tags_lorem.go │ │ ├── tags_macro.go │ │ ├── tags_now.go │ │ ├── tags_set.go │ │ ├── tags_spaceless.go │ │ ├── tags_ssi.go │ │ ├── tags_templatetag.go │ │ ├── tags_widthratio.go │ │ ├── tags_with.go │ │ ├── template.go │ │ ├── template_loader.go │ │ ├── template_sets.go │ │ ├── value.go │ │ └── variable.go ├── fsnotify │ └── fsnotify │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── fen.go │ │ ├── fsnotify.go │ │ ├── inotify.go │ │ ├── inotify_poller.go │ │ ├── kqueue.go │ │ ├── open_mode_bsd.go │ │ ├── open_mode_darwin.go │ │ └── windows.go ├── garyburd │ └── redigo │ │ ├── LICENSE │ │ ├── internal │ │ └── commandinfo.go │ │ └── redis │ │ ├── conn.go │ │ ├── doc.go │ │ ├── go16.go │ │ ├── go17.go │ │ ├── go18.go │ │ ├── log.go │ │ ├── pool.go │ │ ├── pool17.go │ │ ├── pubsub.go │ │ ├── redis.go │ │ ├── reply.go │ │ ├── scan.go │ │ └── script.go ├── go-sql-driver │ └── mysql │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appengine.go │ │ ├── auth.go │ │ ├── buffer.go │ │ ├── collations.go │ │ ├── connection.go │ │ ├── connection_go18.go │ │ ├── const.go │ │ ├── driver.go │ │ ├── dsn.go │ │ ├── errors.go │ │ ├── fields.go │ │ ├── infile.go │ │ ├── packets.go │ │ ├── result.go │ │ ├── rows.go │ │ ├── statement.go │ │ ├── transaction.go │ │ ├── utils.go │ │ ├── utils_go17.go │ │ └── utils_go18.go ├── golang │ └── snappy │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README │ │ ├── decode.go │ │ ├── decode_amd64.go │ │ ├── decode_amd64.s │ │ ├── decode_other.go │ │ ├── encode.go │ │ ├── encode_amd64.go │ │ ├── encode_amd64.s │ │ ├── encode_other.go │ │ └── snappy.go ├── gorilla │ └── websocket │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── README.md │ │ ├── client.go │ │ ├── compression.go │ │ ├── conn.go │ │ ├── doc.go │ │ ├── join.go │ │ ├── json.go │ │ ├── mask.go │ │ ├── mask_safe.go │ │ ├── prepared.go │ │ ├── proxy.go │ │ ├── server.go │ │ ├── tls_handshake.go │ │ ├── tls_handshake_116.go │ │ ├── util.go │ │ └── x_net_proxy.go ├── henrylee2cn │ └── ameda │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── atoi62.go │ │ ├── atoi_x.go │ │ ├── bool.go │ │ ├── bools.go │ │ ├── float32.go │ │ ├── float32s.go │ │ ├── float64.go │ │ ├── float64s.go │ │ ├── initialize.go │ │ ├── int.go │ │ ├── int16.go │ │ ├── int16s.go │ │ ├── int32.go │ │ ├── int32s.go │ │ ├── int64.go │ │ ├── int64s.go │ │ ├── int8.go │ │ ├── int8s.go │ │ ├── interface.go │ │ ├── interfaces.go │ │ ├── ints.go │ │ ├── itoa62.go │ │ ├── itoa_x.go │ │ ├── string.go │ │ ├── strings.go │ │ ├── typconv.go │ │ ├── uint.go │ │ ├── uint16.go │ │ ├── uint16s.go │ │ ├── uint32.go │ │ ├── uint32s.go │ │ ├── uint64.go │ │ ├── uint64s.go │ │ ├── uint8.go │ │ ├── uint8s.go │ │ ├── uints.go │ │ ├── utils.go │ │ └── value.go ├── jinzhu │ ├── gorm │ │ ├── .gitignore │ │ ├── License │ │ ├── README.md │ │ ├── association.go │ │ ├── callback.go │ │ ├── callback_create.go │ │ ├── callback_delete.go │ │ ├── callback_query.go │ │ ├── callback_query_preload.go │ │ ├── callback_row_query.go │ │ ├── callback_save.go │ │ ├── callback_update.go │ │ ├── dialect.go │ │ ├── dialect_common.go │ │ ├── dialect_mysql.go │ │ ├── dialect_postgres.go │ │ ├── dialect_sqlite3.go │ │ ├── dialects │ │ │ ├── mysql │ │ │ │ └── mysql.go │ │ │ └── postgres │ │ │ │ └── postgres.go │ │ ├── docker-compose.yml │ │ ├── errors.go │ │ ├── field.go │ │ ├── interface.go │ │ ├── join_table_handler.go │ │ ├── logger.go │ │ ├── main.go │ │ ├── model.go │ │ ├── model_struct.go │ │ ├── naming.go │ │ ├── scope.go │ │ ├── search.go │ │ ├── test_all.sh │ │ ├── utils.go │ │ └── wercker.yml │ └── inflection │ │ ├── LICENSE │ │ ├── README.md │ │ ├── inflections.go │ │ └── wercker.yml ├── jmoiron │ └── sqlx │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bind.go │ │ ├── doc.go │ │ ├── named.go │ │ ├── named_context.go │ │ ├── reflectx │ │ ├── README.md │ │ └── reflect.go │ │ ├── sqlx.go │ │ └── sqlx_context.go ├── json-iterator │ └── go │ │ ├── .codecov.yml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── Gopkg.lock │ │ ├── Gopkg.toml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── adapter.go │ │ ├── any.go │ │ ├── any_array.go │ │ ├── any_bool.go │ │ ├── any_float.go │ │ ├── any_int32.go │ │ ├── any_int64.go │ │ ├── any_invalid.go │ │ ├── any_nil.go │ │ ├── any_number.go │ │ ├── any_object.go │ │ ├── any_str.go │ │ ├── any_uint32.go │ │ ├── any_uint64.go │ │ ├── build.sh │ │ ├── config.go │ │ ├── fuzzy_mode_convert_table.md │ │ ├── iter.go │ │ ├── iter_array.go │ │ ├── iter_float.go │ │ ├── iter_int.go │ │ ├── iter_object.go │ │ ├── iter_skip.go │ │ ├── iter_skip_sloppy.go │ │ ├── iter_skip_strict.go │ │ ├── iter_str.go │ │ ├── jsoniter.go │ │ ├── pool.go │ │ ├── reflect.go │ │ ├── reflect_array.go │ │ ├── reflect_dynamic.go │ │ ├── reflect_extension.go │ │ ├── reflect_json_number.go │ │ ├── reflect_json_raw_message.go │ │ ├── reflect_map.go │ │ ├── reflect_marshaler.go │ │ ├── reflect_native.go │ │ ├── reflect_optional.go │ │ ├── reflect_slice.go │ │ ├── reflect_struct_decoder.go │ │ ├── reflect_struct_encoder.go │ │ ├── stream.go │ │ ├── stream_float.go │ │ ├── stream_int.go │ │ ├── stream_str.go │ │ └── test.sh ├── juju │ └── errors │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── dependencies.tsv │ │ ├── doc.go │ │ ├── error.go │ │ ├── errortypes.go │ │ ├── functions.go │ │ └── path.go ├── kr │ ├── pretty │ │ ├── .gitignore │ │ ├── License │ │ ├── Readme │ │ ├── diff.go │ │ ├── formatter.go │ │ ├── pretty.go │ │ └── zero.go │ └── text │ │ ├── License │ │ ├── Readme │ │ ├── doc.go │ │ ├── indent.go │ │ └── wrap.go ├── lib │ └── pq │ │ ├── .gitignore │ │ ├── .travis.sh │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── TESTS.md │ │ ├── array.go │ │ ├── buf.go │ │ ├── conn.go │ │ ├── conn_go18.go │ │ ├── connector.go │ │ ├── copy.go │ │ ├── doc.go │ │ ├── encode.go │ │ ├── error.go │ │ ├── hstore │ │ └── hstore.go │ │ ├── notify.go │ │ ├── oid │ │ ├── doc.go │ │ └── types.go │ │ ├── rows.go │ │ ├── scram │ │ └── scram.go │ │ ├── ssl.go │ │ ├── ssl_permissions.go │ │ ├── ssl_windows.go │ │ ├── url.go │ │ ├── user_posix.go │ │ ├── user_windows.go │ │ └── uuid.go ├── modern-go │ ├── concurrent │ │ ├── LICENSE │ │ ├── README.md │ │ ├── executor.go │ │ ├── go_above_19.go │ │ ├── go_below_19.go │ │ └── unbounded_executor.go │ └── reflect2 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── Gopkg.lock │ │ ├── Gopkg.toml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go_above_17.go │ │ ├── go_above_19.go │ │ ├── go_below_17.go │ │ ├── go_below_19.go │ │ ├── reflect2.go │ │ ├── reflect2_amd64.s │ │ ├── reflect2_kind.go │ │ ├── relfect2_386.s │ │ ├── relfect2_amd64p32.s │ │ ├── relfect2_arm.s │ │ ├── relfect2_arm64.s │ │ ├── relfect2_mips64x.s │ │ ├── relfect2_mipsx.s │ │ ├── relfect2_ppc64x.s │ │ ├── relfect2_s390x.s │ │ ├── safe_field.go │ │ ├── safe_map.go │ │ ├── safe_slice.go │ │ ├── safe_struct.go │ │ ├── safe_type.go │ │ ├── test.sh │ │ ├── type_map.go │ │ ├── unsafe_array.go │ │ ├── unsafe_eface.go │ │ ├── unsafe_field.go │ │ ├── unsafe_iface.go │ │ ├── unsafe_link.go │ │ ├── unsafe_map.go │ │ ├── unsafe_ptr.go │ │ ├── unsafe_slice.go │ │ ├── unsafe_struct.go │ │ └── unsafe_type.go ├── pelletier │ └── go-toml │ │ ├── .dockerignore │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── Dockerfile │ │ ├── LICENSE │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── benchmark.json │ │ ├── benchmark.sh │ │ ├── benchmark.toml │ │ ├── benchmark.yml │ │ ├── doc.go │ │ ├── example-crlf.toml │ │ ├── example.toml │ │ ├── fuzz.go │ │ ├── fuzz.sh │ │ ├── keysparsing.go │ │ ├── lexer.go │ │ ├── marshal.go │ │ ├── marshal_OrderPreserve_Map_test.toml │ │ ├── marshal_OrderPreserve_test.toml │ │ ├── marshal_test.toml │ │ ├── parser.go │ │ ├── position.go │ │ ├── token.go │ │ ├── toml.go │ │ ├── tomltree_create.go │ │ └── tomltree_write.go ├── pkg │ └── errors │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── errors.go │ │ └── stack.go ├── pmezard │ └── go-difflib │ │ ├── LICENSE │ │ └── difflib │ │ └── difflib.go ├── siddontang │ ├── go │ │ ├── LICENSE │ │ ├── filelock │ │ │ ├── LICENSE │ │ │ ├── file_lock_generic.go │ │ │ ├── file_lock_solaris.go │ │ │ ├── file_lock_unix.go │ │ │ └── file_lock_windows.go │ │ ├── hack │ │ │ └── hack.go │ │ ├── ioutil2 │ │ │ ├── ioutil.go │ │ │ └── sectionwriter.go │ │ ├── log │ │ │ ├── doc.go │ │ │ ├── filehandler.go │ │ │ ├── handler.go │ │ │ ├── log.go │ │ │ └── sockethandler.go │ │ ├── num │ │ │ ├── bytes.go │ │ │ ├── cmp.go │ │ │ └── str.go │ │ ├── snappy │ │ │ ├── LICENSE │ │ │ ├── decode.go │ │ │ ├── encode.go │ │ │ └── snappy.go │ │ └── sync2 │ │ │ ├── atomic.go │ │ │ └── semaphore.go │ ├── ledisdb │ │ ├── LICENSE │ │ ├── config │ │ │ ├── config-docker.toml │ │ │ ├── config.go │ │ │ └── config.toml │ │ ├── ledis │ │ │ ├── batch.go │ │ │ ├── const.go │ │ │ ├── doc.go │ │ │ ├── dump.go │ │ │ ├── event.go │ │ │ ├── ledis.go │ │ │ ├── ledis_db.go │ │ │ ├── migrate.go │ │ │ ├── replication.go │ │ │ ├── scan.go │ │ │ ├── sort.go │ │ │ ├── t_hash.go │ │ │ ├── t_kv.go │ │ │ ├── t_list.go │ │ │ ├── t_set.go │ │ │ ├── t_ttl.go │ │ │ ├── t_zset.go │ │ │ └── util.go │ │ ├── rpl │ │ │ ├── file_io.go │ │ │ ├── file_store.go │ │ │ ├── file_table.go │ │ │ ├── goleveldb_store.go │ │ │ ├── log.go │ │ │ ├── rpl.go │ │ │ └── store.go │ │ └── store │ │ │ ├── db.go │ │ │ ├── driver │ │ │ ├── driver.go │ │ │ ├── slice.go │ │ │ └── store.go │ │ │ ├── goleveldb │ │ │ ├── batch.go │ │ │ ├── const.go │ │ │ ├── db.go │ │ │ ├── iterator.go │ │ │ └── snapshot.go │ │ │ ├── iterator.go │ │ │ ├── leveldb │ │ │ ├── batch.go │ │ │ ├── cache.go │ │ │ ├── const.go │ │ │ ├── db.go │ │ │ ├── filterpolicy.go │ │ │ ├── iterator.go │ │ │ ├── leveldb_ext.cc │ │ │ ├── leveldb_ext.h │ │ │ ├── levigo-license │ │ │ ├── options.go │ │ │ ├── slice.go │ │ │ ├── snapshot.go │ │ │ └── util.go │ │ │ ├── rocksdb │ │ │ ├── batch.go │ │ │ ├── cache.go │ │ │ ├── const.go │ │ │ ├── db.go │ │ │ ├── env.go │ │ │ ├── filterpolicy.go │ │ │ ├── iterator.go │ │ │ ├── options.go │ │ │ ├── rocksdb_ext.cc │ │ │ ├── rocksdb_ext.h │ │ │ ├── slice.go │ │ │ ├── snapshot.go │ │ │ └── util.go │ │ │ ├── slice.go │ │ │ ├── snapshot.go │ │ │ ├── stat.go │ │ │ ├── store.go │ │ │ └── writebatch.go │ └── rdb │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode.go │ │ ├── digest.go │ │ ├── encode.go │ │ ├── loader.go │ │ ├── reader.go │ │ └── wandoujia-license ├── ssdb │ └── gossdb │ │ ├── LICENSE │ │ └── ssdb │ │ └── ssdb.go ├── stretchr │ └── testify │ │ ├── LICENSE │ │ ├── assert │ │ ├── assertion_compare.go │ │ ├── assertion_compare_can_convert.go │ │ ├── assertion_compare_legacy.go │ │ ├── assertion_format.go │ │ ├── assertion_format.go.tmpl │ │ ├── assertion_forward.go │ │ ├── assertion_forward.go.tmpl │ │ ├── assertion_order.go │ │ ├── assertions.go │ │ ├── doc.go │ │ ├── errors.go │ │ ├── forward_assertions.go │ │ └── http_assertions.go │ │ └── require │ │ ├── doc.go │ │ ├── forward_requirements.go │ │ ├── require.go │ │ ├── require.go.tmpl │ │ ├── require_forward.go │ │ ├── require_forward.go.tmpl │ │ └── requirements.go └── syndtr │ └── goleveldb │ ├── LICENSE │ └── leveldb │ ├── batch.go │ ├── cache │ ├── cache.go │ └── lru.go │ ├── comparer.go │ ├── comparer │ ├── bytes_comparer.go │ └── comparer.go │ ├── db.go │ ├── db_compaction.go │ ├── db_iter.go │ ├── db_snapshot.go │ ├── db_state.go │ ├── db_transaction.go │ ├── db_util.go │ ├── db_write.go │ ├── doc.go │ ├── errors.go │ ├── errors │ └── errors.go │ ├── filter.go │ ├── filter │ ├── bloom.go │ └── filter.go │ ├── iterator │ ├── array_iter.go │ ├── indexed_iter.go │ ├── iter.go │ └── merged_iter.go │ ├── journal │ └── journal.go │ ├── key.go │ ├── memdb │ └── memdb.go │ ├── opt │ └── options.go │ ├── options.go │ ├── session.go │ ├── session_compaction.go │ ├── session_record.go │ ├── session_util.go │ ├── storage.go │ ├── storage │ ├── file_storage.go │ ├── file_storage_nacl.go │ ├── file_storage_plan9.go │ ├── file_storage_solaris.go │ ├── file_storage_unix.go │ ├── file_storage_windows.go │ ├── mem_storage.go │ └── storage.go │ ├── table.go │ ├── table │ ├── reader.go │ ├── table.go │ └── writer.go │ ├── util.go │ ├── util │ ├── buffer.go │ ├── buffer_pool.go │ ├── crc32.go │ ├── hash.go │ ├── range.go │ └── util.go │ └── version.go ├── golang.org └── x │ ├── crypto │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── acme │ │ ├── acme.go │ │ ├── autocert │ │ │ ├── autocert.go │ │ │ ├── cache.go │ │ │ ├── listener.go │ │ │ └── renewal.go │ │ ├── http.go │ │ ├── jws.go │ │ ├── rfc8555.go │ │ ├── types.go │ │ └── version_go112.go │ └── pbkdf2 │ │ └── pbkdf2.go │ ├── net │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── context │ │ ├── context.go │ │ ├── go17.go │ │ ├── go19.go │ │ ├── pre_go17.go │ │ └── pre_go19.go │ ├── html │ │ ├── atom │ │ │ ├── atom.go │ │ │ └── table.go │ │ ├── charset │ │ │ └── charset.go │ │ ├── const.go │ │ ├── doc.go │ │ ├── doctype.go │ │ ├── entity.go │ │ ├── escape.go │ │ ├── foreign.go │ │ ├── node.go │ │ ├── parse.go │ │ ├── render.go │ │ └── token.go │ └── idna │ │ ├── go118.go │ │ ├── idna10.0.0.go │ │ ├── idna9.0.0.go │ │ ├── pre_go118.go │ │ ├── punycode.go │ │ ├── tables10.0.0.go │ │ ├── tables11.0.0.go │ │ ├── tables12.0.0.go │ │ ├── tables13.0.0.go │ │ ├── tables9.0.0.go │ │ ├── trie.go │ │ └── trieval.go │ ├── sys │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── internal │ │ └── unsafeheader │ │ │ └── unsafeheader.go │ ├── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── affinity_linux.go │ │ ├── aliases.go │ │ ├── asm_aix_ppc64.s │ │ ├── asm_bsd_386.s │ │ ├── asm_bsd_amd64.s │ │ ├── asm_bsd_arm.s │ │ ├── asm_bsd_arm64.s │ │ ├── asm_linux_386.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_arm64.s │ │ ├── asm_linux_loong64.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_linux_mipsx.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_riscv64.s │ │ ├── asm_linux_s390x.s │ │ ├── asm_openbsd_mips64.s │ │ ├── asm_solaris_amd64.s │ │ ├── asm_zos_s390x.s │ │ ├── bluetooth_linux.go │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── dev_aix_ppc.go │ │ ├── dev_aix_ppc64.go │ │ ├── dev_darwin.go │ │ ├── dev_dragonfly.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.go │ │ ├── dev_netbsd.go │ │ ├── dev_openbsd.go │ │ ├── dev_zos.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── epoll_zos.go │ │ ├── errors_freebsd_386.go │ │ ├── errors_freebsd_amd64.go │ │ ├── errors_freebsd_arm.go │ │ ├── errors_freebsd_arm64.go │ │ ├── fcntl.go │ │ ├── fcntl_darwin.go │ │ ├── fcntl_linux_32bit.go │ │ ├── fdset.go │ │ ├── fstatfs_zos.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── ifreq_linux.go │ │ ├── ioctl.go │ │ ├── ioctl_linux.go │ │ ├── ioctl_zos.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── pagesize_unix.go │ │ ├── pledge_openbsd.go │ │ ├── ptrace_darwin.go │ │ ├── ptrace_ios.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── readdirent_getdents.go │ │ ├── readdirent_getdirentries.go │ │ ├── sockcmsg_dragonfly.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── sockcmsg_unix_other.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_aix.go │ │ ├── syscall_aix_ppc.go │ │ ├── syscall_aix_ppc64.go │ │ ├── syscall_bsd.go │ │ ├── syscall_darwin.1_12.go │ │ ├── syscall_darwin.1_13.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm64.go │ │ ├── syscall_darwin_libSystem.go │ │ ├── syscall_dragonfly.go │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd.go │ │ ├── syscall_freebsd_386.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_arm64.go │ │ ├── syscall_illumos.go │ │ ├── syscall_linux.go │ │ ├── syscall_linux_386.go │ │ ├── syscall_linux_alarm.go │ │ ├── syscall_linux_amd64.go │ │ ├── syscall_linux_amd64_gc.go │ │ ├── syscall_linux_arm.go │ │ ├── syscall_linux_arm64.go │ │ ├── syscall_linux_gc.go │ │ ├── syscall_linux_gc_386.go │ │ ├── syscall_linux_gc_arm.go │ │ ├── syscall_linux_gccgo_386.go │ │ ├── syscall_linux_gccgo_arm.go │ │ ├── syscall_linux_loong64.go │ │ ├── syscall_linux_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_riscv64.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_arm64.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_openbsd_arm64.go │ │ ├── syscall_openbsd_mips64.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_gc_ppc64x.go │ │ ├── syscall_zos_s390x.go │ │ ├── sysvshm_linux.go │ │ ├── sysvshm_unix.go │ │ ├── sysvshm_unix_other.go │ │ ├── timestruct.go │ │ ├── unveil_openbsd.go │ │ ├── xattr_bsd.go │ │ ├── zerrors_aix_ppc.go │ │ ├── zerrors_aix_ppc64.go │ │ ├── zerrors_darwin_amd64.go │ │ ├── zerrors_darwin_arm64.go │ │ ├── zerrors_dragonfly_amd64.go │ │ ├── zerrors_freebsd_386.go │ │ ├── zerrors_freebsd_amd64.go │ │ ├── zerrors_freebsd_arm.go │ │ ├── zerrors_freebsd_arm64.go │ │ ├── zerrors_linux.go │ │ ├── zerrors_linux_386.go │ │ ├── zerrors_linux_amd64.go │ │ ├── zerrors_linux_arm.go │ │ ├── zerrors_linux_arm64.go │ │ ├── zerrors_linux_loong64.go │ │ ├── zerrors_linux_mips.go │ │ ├── zerrors_linux_mips64.go │ │ ├── zerrors_linux_mips64le.go │ │ ├── zerrors_linux_mipsle.go │ │ ├── zerrors_linux_ppc.go │ │ ├── zerrors_linux_ppc64.go │ │ ├── zerrors_linux_ppc64le.go │ │ ├── zerrors_linux_riscv64.go │ │ ├── zerrors_linux_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_netbsd_arm64.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_openbsd_arm64.go │ │ ├── zerrors_openbsd_mips64.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zerrors_zos_s390x.go │ │ ├── zptrace_armnn_linux.go │ │ ├── zptrace_linux_arm64.go │ │ ├── zptrace_mipsnn_linux.go │ │ ├── zptrace_mipsnnle_linux.go │ │ ├── zptrace_x86_linux.go │ │ ├── zsyscall_aix_ppc.go │ │ ├── zsyscall_aix_ppc64.go │ │ ├── zsyscall_aix_ppc64_gc.go │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ ├── zsyscall_darwin_amd64.1_13.go │ │ ├── zsyscall_darwin_amd64.1_13.s │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_amd64.s │ │ ├── zsyscall_darwin_arm64.1_13.go │ │ ├── zsyscall_darwin_arm64.1_13.s │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_darwin_arm64.s │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.go │ │ ├── zsyscall_freebsd_arm64.go │ │ ├── zsyscall_illumos_amd64.go │ │ ├── zsyscall_linux.go │ │ ├── zsyscall_linux_386.go │ │ ├── zsyscall_linux_amd64.go │ │ ├── zsyscall_linux_arm.go │ │ ├── zsyscall_linux_arm64.go │ │ ├── zsyscall_linux_loong64.go │ │ ├── zsyscall_linux_mips.go │ │ ├── zsyscall_linux_mips64.go │ │ ├── zsyscall_linux_mips64le.go │ │ ├── zsyscall_linux_mipsle.go │ │ ├── zsyscall_linux_ppc.go │ │ ├── zsyscall_linux_ppc64.go │ │ ├── zsyscall_linux_ppc64le.go │ │ ├── zsyscall_linux_riscv64.go │ │ ├── zsyscall_linux_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_netbsd_arm64.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_openbsd_arm64.go │ │ ├── zsyscall_openbsd_mips64.go │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsyscall_zos_s390x.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.go │ │ ├── zsysctl_openbsd_arm64.go │ │ ├── zsysctl_openbsd_mips64.go │ │ ├── zsysnum_darwin_amd64.go │ │ ├── zsysnum_darwin_arm64.go │ │ ├── zsysnum_dragonfly_amd64.go │ │ ├── zsysnum_freebsd_386.go │ │ ├── zsysnum_freebsd_amd64.go │ │ ├── zsysnum_freebsd_arm.go │ │ ├── zsysnum_freebsd_arm64.go │ │ ├── zsysnum_linux_386.go │ │ ├── zsysnum_linux_amd64.go │ │ ├── zsysnum_linux_arm.go │ │ ├── zsysnum_linux_arm64.go │ │ ├── zsysnum_linux_loong64.go │ │ ├── zsysnum_linux_mips.go │ │ ├── zsysnum_linux_mips64.go │ │ ├── zsysnum_linux_mips64le.go │ │ ├── zsysnum_linux_mipsle.go │ │ ├── zsysnum_linux_ppc.go │ │ ├── zsysnum_linux_ppc64.go │ │ ├── zsysnum_linux_ppc64le.go │ │ ├── zsysnum_linux_riscv64.go │ │ ├── zsysnum_linux_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_netbsd_arm64.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_openbsd_arm64.go │ │ ├── zsysnum_openbsd_mips64.go │ │ ├── zsysnum_zos_s390x.go │ │ ├── ztypes_aix_ppc.go │ │ ├── ztypes_aix_ppc64.go │ │ ├── ztypes_darwin_amd64.go │ │ ├── ztypes_darwin_arm64.go │ │ ├── ztypes_dragonfly_amd64.go │ │ ├── ztypes_freebsd_386.go │ │ ├── ztypes_freebsd_amd64.go │ │ ├── ztypes_freebsd_arm.go │ │ ├── ztypes_freebsd_arm64.go │ │ ├── ztypes_illumos_amd64.go │ │ ├── ztypes_linux.go │ │ ├── ztypes_linux_386.go │ │ ├── ztypes_linux_amd64.go │ │ ├── ztypes_linux_arm.go │ │ ├── ztypes_linux_arm64.go │ │ ├── ztypes_linux_loong64.go │ │ ├── ztypes_linux_mips.go │ │ ├── ztypes_linux_mips64.go │ │ ├── ztypes_linux_mips64le.go │ │ ├── ztypes_linux_mipsle.go │ │ ├── ztypes_linux_ppc.go │ │ ├── ztypes_linux_ppc64.go │ │ ├── ztypes_linux_ppc64le.go │ │ ├── ztypes_linux_riscv64.go │ │ ├── ztypes_linux_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_netbsd_arm64.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ ├── ztypes_openbsd_arm64.go │ │ ├── ztypes_openbsd_mips64.go │ │ ├── ztypes_solaris_amd64.go │ │ └── ztypes_zos_s390x.go │ └── windows │ │ ├── aliases.go │ │ ├── dll_windows.go │ │ ├── empty.s │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mkerrors.bash │ │ ├── mkknownfolderids.bash │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── security_windows.go │ │ ├── service.go │ │ ├── setupapi_windows.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_windows.go │ │ ├── types_windows.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ ├── types_windows_arm.go │ │ ├── types_windows_arm64.go │ │ ├── zerrors_windows.go │ │ ├── zknownfolderids_windows.go │ │ └── zsyscall_windows.go │ └── text │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── encoding │ ├── charmap │ │ ├── charmap.go │ │ └── tables.go │ ├── encoding.go │ ├── htmlindex │ │ ├── htmlindex.go │ │ ├── map.go │ │ └── tables.go │ ├── internal │ │ ├── identifier │ │ │ ├── identifier.go │ │ │ └── mib.go │ │ └── internal.go │ ├── japanese │ │ ├── all.go │ │ ├── eucjp.go │ │ ├── iso2022jp.go │ │ ├── shiftjis.go │ │ └── tables.go │ ├── korean │ │ ├── euckr.go │ │ └── tables.go │ ├── simplifiedchinese │ │ ├── all.go │ │ ├── gbk.go │ │ ├── hzgb2312.go │ │ └── tables.go │ ├── traditionalchinese │ │ ├── big5.go │ │ └── tables.go │ └── unicode │ │ ├── override.go │ │ └── unicode.go │ ├── internal │ ├── language │ │ ├── common.go │ │ ├── compact.go │ │ ├── compact │ │ │ ├── compact.go │ │ │ ├── language.go │ │ │ ├── parents.go │ │ │ ├── tables.go │ │ │ └── tags.go │ │ ├── compose.go │ │ ├── coverage.go │ │ ├── language.go │ │ ├── lookup.go │ │ ├── match.go │ │ ├── parse.go │ │ ├── tables.go │ │ └── tags.go │ ├── tag │ │ └── tag.go │ └── utf8internal │ │ └── utf8internal.go │ ├── language │ ├── coverage.go │ ├── doc.go │ ├── go1_1.go │ ├── go1_2.go │ ├── language.go │ ├── match.go │ ├── parse.go │ ├── tables.go │ └── tags.go │ ├── runes │ ├── cond.go │ └── runes.go │ ├── secure │ └── bidirule │ │ ├── bidirule.go │ │ ├── bidirule10.0.0.go │ │ └── bidirule9.0.0.go │ ├── transform │ └── transform.go │ └── unicode │ ├── bidi │ ├── bidi.go │ ├── bracket.go │ ├── core.go │ ├── prop.go │ ├── tables10.0.0.go │ ├── tables11.0.0.go │ ├── tables12.0.0.go │ ├── tables13.0.0.go │ ├── tables9.0.0.go │ └── trieval.go │ └── norm │ ├── composition.go │ ├── forminfo.go │ ├── input.go │ ├── iter.go │ ├── normalize.go │ ├── readwriter.go │ ├── tables10.0.0.go │ ├── tables11.0.0.go │ ├── tables12.0.0.go │ ├── tables13.0.0.go │ ├── tables9.0.0.go │ ├── transform.go │ └── trie.go ├── google.golang.org └── appengine │ ├── LICENSE │ └── cloudsql │ ├── cloudsql.go │ ├── cloudsql_classic.go │ └── cloudsql_vm.go ├── gopkg.in ├── check.v1 │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── TODO │ ├── benchmark.go │ ├── check.go │ ├── checkers.go │ ├── helpers.go │ ├── printer.go │ ├── reporter.go │ └── run.go ├── dgrijalva │ └── jwt-go.v3 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── MIGRATION_GUIDE.md │ │ ├── README.md │ │ ├── VERSION_HISTORY.md │ │ ├── claims.go │ │ ├── doc.go │ │ ├── ecdsa.go │ │ ├── ecdsa_utils.go │ │ ├── errors.go │ │ ├── hmac.go │ │ ├── map_claims.go │ │ ├── none.go │ │ ├── parser.go │ │ ├── rsa.go │ │ ├── rsa_pss.go │ │ ├── rsa_utils.go │ │ ├── signing_method.go │ │ └── token.go └── yaml.v3 │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── emitterc.go │ ├── encode.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go ├── modules.txt └── xorm.io ├── builder ├── .drone.yml ├── LICENSE ├── README.md ├── builder.go ├── builder_delete.go ├── builder_insert.go ├── builder_join.go ├── builder_limit.go ├── builder_select.go ├── builder_union.go ├── builder_update.go ├── cond.go ├── cond_and.go ├── cond_between.go ├── cond_compare.go ├── cond_eq.go ├── cond_expr.go ├── cond_if.go ├── cond_in.go ├── cond_like.go ├── cond_neq.go ├── cond_not.go ├── cond_notin.go ├── cond_null.go ├── cond_or.go ├── doc.go ├── error.go ├── sql.go └── writer.go ├── core ├── .drone.yml ├── .gitignore ├── LICENSE ├── README.md ├── benchmark.sh ├── cache.go ├── column.go ├── converstion.go ├── db.go ├── dialect.go ├── driver.go ├── error.go ├── filter.go ├── ilogger.go ├── index.go ├── mapper.go ├── pk.go ├── rows.go ├── scan.go ├── stmt.go ├── table.go ├── tx.go └── type.go └── xorm ├── .drone.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── README_CN.md ├── cache_lru.go ├── cache_memory_store.go ├── context_cache.go ├── convert.go ├── dialect_mssql.go ├── dialect_mysql.go ├── dialect_oracle.go ├── dialect_postgres.go ├── dialect_sqlite3.go ├── doc.go ├── engine.go ├── engine_cond.go ├── engine_context.go ├── engine_group.go ├── engine_group_policy.go ├── engine_table.go ├── error.go ├── gen_reserved.sh ├── helpers.go ├── helpler_time.go ├── interface.go ├── json.go ├── logger.go ├── pg_reserved.txt ├── processors.go ├── rows.go ├── session.go ├── session_cols.go ├── session_cond.go ├── session_context.go ├── session_convert.go ├── session_delete.go ├── session_exist.go ├── session_find.go ├── session_get.go ├── session_insert.go ├── session_iterate.go ├── session_query.go ├── session_raw.go ├── session_schema.go ├── session_stats.go ├── session_tx.go ├── session_update.go ├── statement.go ├── statement_args.go ├── statement_columnmap.go ├── statement_exprparam.go ├── statement_quote.go ├── syslogger.go ├── tag.go ├── test_mssql.sh ├── test_mssql_cache.sh ├── test_mymysql.sh ├── test_mymysql_cache.sh ├── test_mysql.sh ├── test_mysql_cache.sh ├── test_postgres.sh ├── test_postgres_cache.sh ├── test_sqlite.sh ├── test_sqlite_cache.sh ├── test_tidb.sh ├── transaction.go ├── types.go └── xorm.go /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.a 3 | *.so 4 | _obj 5 | _test 6 | *.[568vq] 7 | [568vq].out 8 | *.cgo1.go 9 | *.cgo2.c 10 | _cgo_defun.c 11 | _cgo_gotypes.go 12 | _cgo_export.* 13 | _testmain.go 14 | *.exe 15 | *.exe~ 16 | *.test 17 | *.prof 18 | *.rar 19 | *.zip 20 | *.gz 21 | *.psd 22 | *.bmd 23 | *.cfg 24 | *.pptx 25 | *.log 26 | *nohup.out 27 | *.sublime-project 28 | *.sublime-workspace 29 | vendor/*_test.go 30 | 31 | samples/*/log/* 32 | samples/MultiUsage/MultiUsage 33 | samples/directsql/directsql 34 | samples/demo/demo 35 | 36 | ext/services 37 | .DS_Store 38 | .idea 39 | -------------------------------------------------------------------------------- /_syso/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/_syso/favicon.ico -------------------------------------------------------------------------------- /_syso/favicon.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | true 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /_syso/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/_syso/favicon.png -------------------------------------------------------------------------------- /_syso/favicon.syso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/_syso/favicon.syso -------------------------------------------------------------------------------- /_syso/syso.go: -------------------------------------------------------------------------------- 1 | package syso 2 | -------------------------------------------------------------------------------- /apiware/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.exe~ 3 | *.rar 4 | *.psd 5 | *.sublime-project 6 | *.sublime-workspace -------------------------------------------------------------------------------- /apiware/util_test.go: -------------------------------------------------------------------------------- 1 | package apiware 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestInterfaceToSnake(t *testing.T) { 8 | type SampleModel struct{} 9 | name := interfaceToSnake(&SampleModel{}) 10 | if name != "sample_model" { 11 | t.Fatal("wrong table name", name) 12 | } 13 | name = interfaceToSnake(SampleModel{}) 14 | if name != "sample_model" { 15 | t.Fatal("wrong table name", name) 16 | } 17 | } 18 | 19 | func TestSnakeToUpperCamel(t *testing.T) { 20 | if s := snakeToUpperCamel("table_name"); s != "TableName" { 21 | t.Fatal("wrong string", s) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /config_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 AndeyaLee. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package faygo 16 | 17 | import ( 18 | "testing" 19 | ) 20 | 21 | func TestNewConfig(t *testing.T) { 22 | t.Logf("%#v", newConfigFromFileAndCheck("test/faygo.ini")) 23 | } 24 | -------------------------------------------------------------------------------- /doc/MultiUsage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/doc/MultiUsage.png -------------------------------------------------------------------------------- /doc/apidoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/doc/apidoc.png -------------------------------------------------------------------------------- /doc/faygo_48x48.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/doc/faygo_48x48.ico -------------------------------------------------------------------------------- /doc/faygo_96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/doc/faygo_96x96.png -------------------------------------------------------------------------------- /doc/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/doc/index.png -------------------------------------------------------------------------------- /doc/server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/doc/server.png -------------------------------------------------------------------------------- /ext/barcode/README.md: -------------------------------------------------------------------------------- 1 | ## Introduction## 2 | This is a package for GO which can be used to create different types of barcodes. 3 | 4 | ## Supported Barcode Types## 5 | * Codabar 6 | * Code 128 7 | * Code 39 8 | * EAN 8 9 | * EAN 13 10 | * Datamatrix 11 | * QR Codes 12 | * 2 of 5 13 | 14 | ## Documentation## 15 | See [GoDoc](https://godoc.org/github.com/boombuler/barcode) 16 | 17 | To create a barcode use the Encode function from one of the subpackages. 18 | -------------------------------------------------------------------------------- /ext/barcode/barcode.go: -------------------------------------------------------------------------------- 1 | package barcode 2 | 3 | import "image" 4 | 5 | // Contains some meta information about a barcode 6 | type Metadata struct { 7 | // the name of the barcode kind 8 | CodeKind string 9 | // contains 1 for 1D barcodes or 2 for 2D barcodes 10 | Dimensions byte 11 | } 12 | 13 | // a rendered and encoded barcode 14 | type Barcode interface { 15 | image.Image 16 | // returns some meta information about the barcode 17 | Metadata() Metadata 18 | // the data that was encoded in this barcode 19 | Content() string 20 | CheckSum() int 21 | } 22 | -------------------------------------------------------------------------------- /ext/barcode/codabar/encoder_test.go: -------------------------------------------------------------------------------- 1 | package codabar 2 | 3 | import ( 4 | "image/color" 5 | "testing" 6 | ) 7 | 8 | func Test_Encode(t *testing.T) { 9 | _, err := Encode("FOOBAR") 10 | if err == nil { 11 | t.Error("\"FOOBAR\" should not be encodable") 12 | } 13 | 14 | testEncode := func(txt, testResult string) { 15 | code, err := Encode(txt) 16 | if err != nil || code == nil { 17 | t.Fail() 18 | } else { 19 | if code.Bounds().Max.X != len(testResult) { 20 | t.Errorf("%v: length missmatch", txt) 21 | } else { 22 | for i, r := range testResult { 23 | if (code.At(i, 0) == color.Black) != (r == '1') { 24 | t.Errorf("%v: code missmatch on position %d", txt, i) 25 | } 26 | } 27 | } 28 | } 29 | } 30 | 31 | testEncode("A40156B", "10110010010101101001010101001101010110010110101001010010101101010010011") 32 | } 33 | -------------------------------------------------------------------------------- /ext/barcode/qr/automatic.go: -------------------------------------------------------------------------------- 1 | package qr 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/andeya/faygo/ext/barcode/utils" 7 | ) 8 | 9 | func encodeAuto(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { 10 | bits, vi, _ := Numeric.getEncoder()(content, ecl) 11 | if bits != nil && vi != nil { 12 | return bits, vi, nil 13 | } 14 | bits, vi, _ = AlphaNumeric.getEncoder()(content, ecl) 15 | if bits != nil && vi != nil { 16 | return bits, vi, nil 17 | } 18 | bits, vi, _ = Unicode.getEncoder()(content, ecl) 19 | if bits != nil && vi != nil { 20 | return bits, vi, nil 21 | } 22 | return nil, nil, fmt.Errorf("No encoding found to encode \"%s\"", content) 23 | } 24 | -------------------------------------------------------------------------------- /ext/barcode/qr/unicode.go: -------------------------------------------------------------------------------- 1 | package qr 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/andeya/faygo/ext/barcode/utils" 7 | ) 8 | 9 | func encodeUnicode(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { 10 | data := []byte(content) 11 | 12 | vi := findSmallestVersionInfo(ecl, byteMode, len(data)*8) 13 | if vi == nil { 14 | return nil, nil, errors.New("To much data to encode") 15 | } 16 | 17 | // It's not correct to add the unicode bytes to the result directly but most readers can't handle the 18 | // required ECI header... 19 | res := new(utils.BitList) 20 | res.AddBits(int(byteMode), 4) 21 | res.AddBits(len(content), vi.charCountBits(byteMode)) 22 | for _, b := range data { 23 | res.AddByte(b) 24 | } 25 | addPaddingAndTerminator(res, vi) 26 | return res, vi, nil 27 | } 28 | -------------------------------------------------------------------------------- /ext/barcode/qr/unicode_test.go: -------------------------------------------------------------------------------- 1 | package qr 2 | 3 | import ( 4 | "bytes" 5 | "testing" 6 | ) 7 | 8 | func Test_UnicodeEncoding(t *testing.T) { 9 | encode := Unicode.getEncoder() 10 | x, vi, err := encode("A", H) // 65 11 | if x == nil || vi == nil || vi.Version != 1 || bytes.Compare(x.GetBytes(), []byte{64, 20, 16, 236, 17, 236, 17, 236, 17}) != 0 { 12 | t.Errorf("\"A\" failed to encode: %s", err) 13 | } 14 | _, _, err = encode(makeString(3000, "A"), H) 15 | if err == nil { 16 | t.Error("Unicode encoding should not be able to encode a 3kb string") 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ext/barcode/utils/runeint.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | // RuneToInt converts a rune between '0' and '9' to an integer between 0 and 9 4 | // If the rune is outside of this range -1 is returned. 5 | func RuneToInt(r rune) int { 6 | if r >= '0' && r <= '9' { 7 | return int(r - '0') 8 | } 9 | return -1 10 | } 11 | 12 | // IntToRune converts a digit 0 - 9 to the rune '0' - '9'. If the given int is outside 13 | // of this range 'F' is returned! 14 | func IntToRune(i int) rune { 15 | if i >= 0 && i <= 9 { 16 | return rune(i + '0') 17 | } 18 | return 'F' 19 | } 20 | -------------------------------------------------------------------------------- /ext/barcode/utils/runeint_test.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import "testing" 4 | 5 | func Test_RuneToIntIntToRune(t *testing.T) { 6 | if IntToRune(0) != '0' { 7 | t.Errorf("failed IntToRune(0) returned %d", string(IntToRune(0))) 8 | } 9 | if IntToRune(9) != '9' { 10 | t.Errorf("failed IntToRune(9) returned %d", IntToRune(9)) 11 | } 12 | if IntToRune(10) != 'F' { 13 | t.Errorf("failed IntToRune(10) returned %d", IntToRune(10)) 14 | } 15 | if RuneToInt('0') != 0 { 16 | t.Error("failed RuneToInt('0') returned %d", RuneToInt(0)) 17 | } 18 | if RuneToInt('9') != 9 { 19 | t.Error("failed RuneToInt('9') returned %d", RuneToInt(9)) 20 | } 21 | if RuneToInt('F') != -1 { 22 | t.Error("failed RuneToInt('F') returned %d", RuneToInt('F')) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ext/bitconv/bitconv_test.go: -------------------------------------------------------------------------------- 1 | package bitconv 2 | 3 | import ( 4 | "math" 5 | "testing" 6 | ) 7 | 8 | func TestFormat(t *testing.T) { 9 | t.Log(New().Format(math.MaxInt64)) 10 | } 11 | -------------------------------------------------------------------------------- /ext/cron/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /ext/cron/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | -------------------------------------------------------------------------------- /ext/cron/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](http://godoc.org/github.com/robfig/cron?status.png)](http://godoc.org/github.com/robfig/cron) 2 | [![Build Status](https://travis-ci.org/robfig/cron.svg?branch=master)](https://travis-ci.org/robfig/cron) 3 | -------------------------------------------------------------------------------- /ext/db/directsql/sqlrouter.go: -------------------------------------------------------------------------------- 1 | /* 2 | 动态SQL路由注册 3 | 特别说明:将router定义代码放到 sysrouter.go中 4 | */ 5 | package directsql 6 | 7 | /* 8 | import ( 9 | "github.com/andeya/faygo" 10 | ) 11 | 12 | //注册路由 13 | func SysRoute(frame *faygo.Framework) { 14 | // bos 执行SQL定义的路由 15 | frame.NamedAPI("DirectSQL", "GET POST", "/bos/*path", directsql.DirectSQL()) //.Use(middleware.CheckLogin()) 16 | frame.NamedGET("DirectSQL ModelSql Reload", "/bom/reloadall", directsql.DirectSQLReloadAll()) //.Use(middleware.CheckLogin()) 17 | frame.NamedGET("DirectSQL ModelSql Reload", "/bom/reload/*path", directsql.DirectSQLReloadModel()) //.Use(middleware.CheckLogin()) 18 | } 19 | }*/ 20 | -------------------------------------------------------------------------------- /ext/db/directsqlx/sqlrouter.go: -------------------------------------------------------------------------------- 1 | /* 2 | 动态SQL路由注册 3 | 特别说明:将router定义代码放到 sysrouter.go中 4 | */ 5 | package directsqlx 6 | 7 | /* 8 | import ( 9 | "github.com/andeya/faygo" 10 | ) 11 | 12 | //注册路由 13 | func SysRoute(frame *faygo.Framework) { 14 | // bos 执行SQL定义的路由 15 | frame.NamedAPI("DirectSQL", "GET POST", "/bos/*path", directsql.DirectSQL()) //.Use(middleware.CheckLogin()) 16 | frame.NamedGET("DirectSQL ModelSql Reload", "/bom/reloadall", directsql.DirectSQLReloadAll()) //.Use(middleware.CheckLogin()) 17 | frame.NamedGET("DirectSQL ModelSql Reload", "/bom/reload/*path", directsql.DirectSQLReloadModel()) //.Use(middleware.CheckLogin()) 18 | 19 | } 20 | }*/ 21 | -------------------------------------------------------------------------------- /ext/db/gorm/config_test.go: -------------------------------------------------------------------------------- 1 | package gorm 2 | 3 | import "testing" 4 | 5 | func TestConfig(t *testing.T) { 6 | t.Logf("%#v", dbConfigs) 7 | t.Logf("%#v", defaultConfig) 8 | } 9 | -------------------------------------------------------------------------------- /ext/db/sqlx/config_test.go: -------------------------------------------------------------------------------- 1 | package sqlx 2 | 3 | import "testing" 4 | 5 | func TestConfig(t *testing.T) { 6 | t.Logf("%#v", dbConfigs) 7 | t.Logf("%#v", defaultConfig) 8 | t.Logf("%#v", dbConfigs[DEFAULTDB_NAME]) 9 | } 10 | -------------------------------------------------------------------------------- /ext/db/xorm/config_test.go: -------------------------------------------------------------------------------- 1 | package xorm 2 | 3 | import "testing" 4 | 5 | func TestConfig(t *testing.T) { 6 | t.Logf("%#v", dbConfigs) 7 | t.Logf("%#v", defaultConfig) 8 | } 9 | -------------------------------------------------------------------------------- /ext/middleware/jwt/sample/log/app.pid: -------------------------------------------------------------------------------- 1 | 7560 2 | -------------------------------------------------------------------------------- /ext/otp/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.5 5 | - 1.6 6 | - tip 7 | -------------------------------------------------------------------------------- /ext/otp/NOTICE: -------------------------------------------------------------------------------- 1 | otp 2 | Copyright (c) 2014, Paul Querna 3 | 4 | This product includes software developed by 5 | Paul Querna (http://paul.querna.org/). 6 | -------------------------------------------------------------------------------- /ext/surfer/.gitignore: -------------------------------------------------------------------------------- 1 | example/*.exe 2 | phantomjs/* 3 | *.exe 4 | *.rar -------------------------------------------------------------------------------- /ext/surfer/agent_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd netbsd openbsd 2 | 3 | package surfer 4 | 5 | import ( 6 | "runtime" 7 | "syscall" 8 | ) 9 | 10 | // osName returns the name of the OS. 11 | func osName() string { 12 | name, err := syscall.Sysctl("kern.ostype") 13 | if err != nil { 14 | return runtime.GOOS 15 | } 16 | return name 17 | } 18 | 19 | // osVersion returns the OS version. 20 | func osVersion() string { 21 | release, err := syscall.Sysctl("kern.osrelease") 22 | if err != nil { 23 | return "0.0" 24 | } 25 | return release 26 | } 27 | -------------------------------------------------------------------------------- /ext/surfer/agent_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package surfer 4 | 5 | import ( 6 | "fmt" 7 | "runtime" 8 | "syscall" 9 | ) 10 | 11 | // osName returns the name of the OS. 12 | func osName() string { 13 | return runtime.GOOS 14 | } 15 | 16 | // osVersion returns the OS version. 17 | func osVersion() string { 18 | v, err := syscall.GetVersion() 19 | if err != nil { 20 | return "0.0" 21 | } 22 | major := uint8(v) 23 | minor := uint8(v >> 8) 24 | return fmt.Sprintf("%d.%d", major, minor) 25 | } 26 | -------------------------------------------------------------------------------- /ext/uuid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 Google Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package uuid generates and inspects UUIDs. 6 | // 7 | // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security 8 | // Services. 9 | // 10 | // A UUID is a 16 byte (128 bit) array. UUIDs may be used as keys to 11 | // maps or compared directly. 12 | package uuid 13 | -------------------------------------------------------------------------------- /ext/websocket/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | 24 | .idea/ 25 | *.iml -------------------------------------------------------------------------------- /ext/websocket/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.4 7 | - go: 1.5 8 | - go: 1.6 9 | - go: 1.7 10 | - go: tip 11 | allow_failures: 12 | - go: tip 13 | 14 | script: 15 | - go get -t -v ./... 16 | - diff -u <(echo -n) <(gofmt -d .) 17 | - go vet $(go list ./... | grep -v /vendor/) 18 | - go test -v -race ./... 19 | -------------------------------------------------------------------------------- /ext/websocket/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Gorilla WebSocket authors for copyright 2 | # purposes. 3 | # 4 | # Please keep the list sorted. 5 | 6 | Gary Burd 7 | Joachim Bauch 8 | 9 | -------------------------------------------------------------------------------- /ext/websocket/compression_test.go: -------------------------------------------------------------------------------- 1 | package websocket 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | "testing" 7 | ) 8 | 9 | type nopCloser struct{ io.Writer } 10 | 11 | func (nopCloser) Close() error { return nil } 12 | 13 | func TestTruncWriter(t *testing.T) { 14 | const data = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijlkmnopqrstuvwxyz987654321" 15 | for n := 1; n <= 10; n++ { 16 | var b bytes.Buffer 17 | w := &truncWriter{w: nopCloser{&b}} 18 | p := []byte(data) 19 | for len(p) > 0 { 20 | m := len(p) 21 | if m > n { 22 | m = n 23 | } 24 | w.Write(p[:m]) 25 | p = p[m:] 26 | } 27 | if b.String() != data[:len(data)-len(w.p)] { 28 | t.Errorf("%d: %q", n, b.String()) 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ext/websocket/conn_read.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.5 6 | 7 | package websocket 8 | 9 | import "io" 10 | 11 | func (c *Conn) read(n int) ([]byte, error) { 12 | p, err := c.br.Peek(n) 13 | if err == io.EOF { 14 | err = errUnexpectedEOF 15 | } 16 | c.br.Discard(len(p)) 17 | return p, err 18 | } 19 | -------------------------------------------------------------------------------- /ext/websocket/conn_read_legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.5 6 | 7 | package websocket 8 | 9 | import "io" 10 | 11 | func (c *Conn) read(n int) ([]byte, error) { 12 | p, err := c.br.Peek(n) 13 | if err == io.EOF { 14 | err = errUnexpectedEOF 15 | } 16 | if len(p) > 0 { 17 | // advance over the bytes just read 18 | io.ReadFull(c.br, p) 19 | } 20 | return p, err 21 | } 22 | -------------------------------------------------------------------------------- /ext/websocket/examples/autobahn/README.md: -------------------------------------------------------------------------------- 1 | # Test Server 2 | 3 | This package contains a server for the [Autobahn WebSockets Test Suite](http://autobahn.ws/testsuite). 4 | 5 | To test the server, run 6 | 7 | go run server.go 8 | 9 | and start the client test driver 10 | 11 | wstest -m fuzzingclient -s fuzzingclient.json 12 | 13 | When the client completes, it writes a report to reports/clients/index.html. 14 | -------------------------------------------------------------------------------- /ext/websocket/examples/autobahn/fuzzingclient.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "options": {"failByDrop": false}, 4 | "outdir": "./reports/clients", 5 | "servers": [ 6 | {"agent": "ReadAllWriteMessage", "url": "ws://localhost:9000/m", "options": {"version": 18}}, 7 | {"agent": "ReadAllWrite", "url": "ws://localhost:9000/r", "options": {"version": 18}}, 8 | {"agent": "CopyFull", "url": "ws://localhost:9000/f", "options": {"version": 18}}, 9 | {"agent": "CopyWriterOnly", "url": "ws://localhost:9000/c", "options": {"version": 18}} 10 | ], 11 | "cases": ["*"], 12 | "exclude-cases": [], 13 | "exclude-agent-cases": {} 14 | } 15 | -------------------------------------------------------------------------------- /ext/websocket/examples/command/README.md: -------------------------------------------------------------------------------- 1 | # Command example 2 | 3 | This example connects a websocket connection to stdin and stdout of a command. 4 | Received messages are written to stdin followed by a `\n`. Each line read from 5 | from standard out is sent as a message to the client. 6 | 7 | $ go get github.com/gorilla/websocket 8 | $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/command` 9 | $ go run main.go 10 | # Open http://localhost:8080/ . 11 | 12 | Try the following commands. 13 | 14 | # Echo sent messages to the output area. 15 | $ go run main.go cat 16 | 17 | # Run a shell.Try sending "ls" and "cat main.go". 18 | $ go run main.go sh 19 | 20 | -------------------------------------------------------------------------------- /ext/websocket/examples/echo/README.md: -------------------------------------------------------------------------------- 1 | # Client and server example 2 | 3 | This example shows a simple client and server. 4 | 5 | The server echoes messages sent to it. The client sends a message every second 6 | and prints all messages received. 7 | 8 | To run the example, start the server: 9 | 10 | $ go run server.go 11 | 12 | Next, start the client: 13 | 14 | $ go run client.go 15 | 16 | The server includes a simple web client. To use the client, open 17 | http://127.0.0.1:8080 in the browser and follow the instructions on the page. 18 | -------------------------------------------------------------------------------- /ext/websocket/examples/filewatch/README.md: -------------------------------------------------------------------------------- 1 | # File Watch example. 2 | 3 | This example sends a file to the browser client for display whenever the file is modified. 4 | 5 | $ go get github.com/gorilla/websocket 6 | $ cd `go list -f '{{.Dir}}' github.com/gorilla/websocket/examples/filewatch` 7 | $ go run main.go 8 | # Open http://localhost:8080/ . 9 | # Modify the file to see it update in the browser. 10 | -------------------------------------------------------------------------------- /ext/websocket/helper.go: -------------------------------------------------------------------------------- 1 | package websocket 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/andeya/faygo" 7 | ) 8 | 9 | // FayUpgrade upgrades the faygo server connection to the WebSocket protocol. 10 | // 11 | // The responseHeader is included in the response to the client's upgrade 12 | // request. Use the responseHeader to specify cookies (Set-Cookie) and the 13 | // application negotiated subprotocol (Sec-Websocket-Protocol). 14 | // 15 | // If the upgrade fails, then FayUpgrade replies to the client with an HTTP error 16 | // response. 17 | func (u *Upgrader) FayUpgrade(ctx *faygo.Context, responseHeader http.Header) (*Conn, error) { 18 | return u.Upgrade(ctx.W, ctx.R, responseHeader) 19 | } 20 | -------------------------------------------------------------------------------- /faygo_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 AndeyaLee. All Rights Reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package faygo 16 | -------------------------------------------------------------------------------- /freecache/murmur3/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /log/app.pid: -------------------------------------------------------------------------------- 1 | 22132 2 | -------------------------------------------------------------------------------- /logging/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Alec Thomas 2 | Guilhem Lettron 3 | Ivan Daniluk 4 | Nimi Wariboko Jr 5 | Róbert Selvek 6 | -------------------------------------------------------------------------------- /logging/color/colorable_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package color 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | func NewColorable(file *os.File) io.Writer { 11 | if file == nil { 12 | panic("nil passed instead of *os.File to NewColorable()") 13 | } 14 | 15 | return file 16 | } 17 | 18 | func NewColorableStdout() io.Writer { 19 | return os.Stdout 20 | } 21 | 22 | func NewColorableStderr() io.Writer { 23 | return os.Stderr 24 | } 25 | -------------------------------------------------------------------------------- /logging/color/isatty_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package color 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on on appengine classic which is a sandboxed PaaS. 7 | func IsTerminal(fd uintptr) bool { 8 | return false 9 | } 10 | -------------------------------------------------------------------------------- /logging/color/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd 2 | // +build !appengine 3 | 4 | package color 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | -------------------------------------------------------------------------------- /logging/color/isatty_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build !appengine 3 | 4 | package color 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TCGETS 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | -------------------------------------------------------------------------------- /logging/color/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package color 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | var termio unix.Termio 14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 15 | return err == nil 16 | } 17 | -------------------------------------------------------------------------------- /logging/color/isatty_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | // +build !appengine 3 | 4 | package color 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | var kernel32 = syscall.NewLazyDLL("kernel32.dll") 12 | var procGetConsoleMode = kernel32.NewProc("GetConsoleMode") 13 | 14 | // IsTerminal return true if the file descriptor is terminal. 15 | func IsTerminal(fd uintptr) bool { 16 | var st uint32 17 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) 18 | return r != 0 && e == 0 19 | } 20 | -------------------------------------------------------------------------------- /logging/examples/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/logging/examples/example.png -------------------------------------------------------------------------------- /logging/memory_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013, Örjan Persson. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package logging 6 | 7 | // TODO share more code between these tests 8 | func MemoryRecordN(b *MemoryBackend, n int) *Record { 9 | node := b.Head() 10 | for i := 0; i < n; i++ { 11 | if node == nil { 12 | break 13 | } 14 | node = node.Next() 15 | } 16 | if node == nil { 17 | return nil 18 | } 19 | return node.Record 20 | } 21 | 22 | func ChannelMemoryRecordN(b *ChannelMemoryBackend, n int) *Record { 23 | b.Flush() 24 | node := b.Head() 25 | for i := 0; i < n; i++ { 26 | if node == nil { 27 | break 28 | } 29 | node = node.Next() 30 | } 31 | if node == nil { 32 | return nil 33 | } 34 | return node.Record 35 | } 36 | -------------------------------------------------------------------------------- /pongo2/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | .idea 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | 25 | .project 26 | EBNF.txt 27 | test1.tpl 28 | pongo2_internal_test.go 29 | tpl-error.out 30 | /count.out 31 | /cover.out 32 | *.swp 33 | *.iml 34 | /cpu.out 35 | /mem.out 36 | /pongo2.test 37 | *.error 38 | /profile 39 | /coverage.out 40 | /pongo2_internal_test.ignore 41 | -------------------------------------------------------------------------------- /pongo2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | - tip 6 | install: 7 | - go get golang.org/x/tools/cmd/cover 8 | - go get github.com/mattn/goveralls 9 | - go get gopkg.in/check.v1 10 | script: 11 | - go test -v -covermode=count -coverprofile=coverage.out -bench . -cpu 1,4 12 | - '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN || true' 13 | -------------------------------------------------------------------------------- /pongo2/AUTHORS: -------------------------------------------------------------------------------- 1 | Main author and maintainer of pongo2: 2 | 3 | * Florian Schlachter 4 | 5 | Contributors (in no specific order): 6 | 7 | * @romanoaugusto88 8 | * @vitalbh 9 | 10 | Feel free to add yourself to the list or to modify your entry if you did a contribution. 11 | -------------------------------------------------------------------------------- /pongo2/docs/examples.md: -------------------------------------------------------------------------------- 1 | (Stub, TBA) -------------------------------------------------------------------------------- /pongo2/docs/index.md: -------------------------------------------------------------------------------- 1 | (Stub, TBA) -------------------------------------------------------------------------------- /pongo2/docs/macros.md: -------------------------------------------------------------------------------- 1 | (Stub, TBA) 2 | -------------------------------------------------------------------------------- /pongo2/docs/tags.md: -------------------------------------------------------------------------------- 1 | TODO: 2 | 3 | * What are tags? 4 | * List+explain all existing tags (pongo2 + pongo2-addons) 5 | 6 | Implemented tags so far which needs documentation: 7 | 8 | * autoescape 9 | * block 10 | * comment 11 | * cycle 12 | * extends 13 | * filter 14 | * firstof 15 | * for 16 | * if 17 | * ifchanged 18 | * ifequal 19 | * ifnotequal 20 | * import 21 | * include 22 | * lorem 23 | * macro 24 | * now 25 | * set 26 | * spaceless 27 | * ssi 28 | * templatetag 29 | * verbatim 30 | * widthratio 31 | * with -------------------------------------------------------------------------------- /pongo2/docs/template_sets.md: -------------------------------------------------------------------------------- 1 | (Stub, TBA) -------------------------------------------------------------------------------- /pongo2/docs/write_filters.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/pongo2/docs/write_filters.md -------------------------------------------------------------------------------- /pongo2/docs/write_tags.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/pongo2/docs/write_tags.md -------------------------------------------------------------------------------- /pongo2/helpers.go: -------------------------------------------------------------------------------- 1 | package pongo2 2 | 3 | func max(a, b int) int { 4 | if a > b { 5 | return a 6 | } 7 | return b 8 | } 9 | 10 | func min(a, b int) int { 11 | if a < b { 12 | return a 13 | } 14 | return b 15 | } 16 | -------------------------------------------------------------------------------- /pongo2/nodes.go: -------------------------------------------------------------------------------- 1 | package pongo2 2 | 3 | // The root document 4 | type nodeDocument struct { 5 | Nodes []INode 6 | } 7 | 8 | func (doc *nodeDocument) Execute(ctx *ExecutionContext, writer TemplateWriter) *Error { 9 | for _, n := range doc.Nodes { 10 | err := n.Execute(ctx, writer) 11 | if err != nil { 12 | return err 13 | } 14 | } 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /pongo2/nodes_html.go: -------------------------------------------------------------------------------- 1 | package pongo2 2 | 3 | type nodeHTML struct { 4 | token *Token 5 | } 6 | 7 | func (n *nodeHTML) Execute(ctx *ExecutionContext, writer TemplateWriter) *Error { 8 | writer.WriteString(n.token.Val) 9 | return nil 10 | } 11 | -------------------------------------------------------------------------------- /pongo2/nodes_wrapper.go: -------------------------------------------------------------------------------- 1 | package pongo2 2 | 3 | type NodeWrapper struct { 4 | Endtag string 5 | nodes []INode 6 | } 7 | 8 | func (wrapper *NodeWrapper) Execute(ctx *ExecutionContext, writer TemplateWriter) *Error { 9 | for _, n := range wrapper.nodes { 10 | err := n.Execute(ctx, writer) 11 | if err != nil { 12 | return err 13 | } 14 | } 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /pongo2/pongo2.go: -------------------------------------------------------------------------------- 1 | package pongo2 2 | 3 | // Version string 4 | const Version = "dev" 5 | 6 | // Must panics, if a Template couldn't successfully parsed. This is how you 7 | // would use it: 8 | // var baseTemplate = pongo2.Must(pongo2.FromFile("templates/base.html")) 9 | func Must(tpl *Template, err error) *Template { 10 | if err != nil { 11 | panic(err) 12 | } 13 | return tpl 14 | } 15 | -------------------------------------------------------------------------------- /pongo2/tags_comment.go: -------------------------------------------------------------------------------- 1 | package pongo2 2 | 3 | type tagCommentNode struct{} 4 | 5 | func (node *tagCommentNode) Execute(ctx *ExecutionContext, writer TemplateWriter) *Error { 6 | return nil 7 | } 8 | 9 | func tagCommentParser(doc *Parser, start *Token, arguments *Parser) (INodeTag, *Error) { 10 | commentNode := &tagCommentNode{} 11 | 12 | // TODO: Process the endtag's arguments (see django 'comment'-tag documentation) 13 | err := doc.SkipUntilTag("endcomment") 14 | if err != nil { 15 | return nil, err 16 | } 17 | 18 | if arguments.Count() != 0 { 19 | return nil, arguments.Error("Tag 'comment' does not take any argument.", nil) 20 | } 21 | 22 | return commentNode, nil 23 | } 24 | 25 | func init() { 26 | RegisterTag("comment", tagCommentParser) 27 | } 28 | -------------------------------------------------------------------------------- /pongo2/template_tests/autoescape.tpl: -------------------------------------------------------------------------------- 1 | {{ "" }} 2 | {% autoescape off %} 3 | {{ "" }} 4 | {% endautoescape %} 5 | {% autoescape on %} 6 | {{ "" }} 7 | {% endautoescape %} 8 | {% autoescape off %} 9 | {{ ""|escape }} 10 | {% endautoescape %} -------------------------------------------------------------------------------- /pongo2/template_tests/autoescape.tpl.out: -------------------------------------------------------------------------------- 1 | <script>alert('xss');</script> 2 | 3 | 4 | 5 | 6 | <script>alert('xss');</script> 7 | 8 | 9 | <script>alert('xss');</script> 10 | -------------------------------------------------------------------------------- /pongo2/template_tests/base_dir_test/base.html: -------------------------------------------------------------------------------- 1 | Hello from {{ base_directory }} -------------------------------------------------------------------------------- /pongo2/template_tests/base_dir_test/subdir/include.html: -------------------------------------------------------------------------------- 1 | {% include "base.html" %} -------------------------------------------------------------------------------- /pongo2/template_tests/base_dir_test/subdir/index.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | -------------------------------------------------------------------------------- /pongo2/template_tests/base_dir_test/subdir/ssi.html: -------------------------------------------------------------------------------- 1 | {% ssi "base.html" parsed %} -------------------------------------------------------------------------------- /pongo2/template_tests/comment.tpl.out: -------------------------------------------------------------------------------- 1 | empty single line comment 2 | 3 | 4 | filled single line comment 5 | 6 | 7 | filled single line comment with valid tags 8 | 9 | 10 | filled single line comment with invalid tags 11 | 12 | 13 | filled single line comment with invalid syntax 14 | 15 | 16 | empty block comment 17 | 18 | 19 | filled text single line block comment 20 | 21 | 22 | empty multi line block comment 23 | 24 | 25 | block comment with other tags inside of it 26 | 27 | 28 | block comment with invalid tags inside of it 29 | 30 | 31 | block comment with invalid syntax inside of it 32 | 33 | 34 | Regular tags between comments to verify it doesn't break in the lexer 35 | 36 | after if 37 | 38 | 39 | end of file 40 | -------------------------------------------------------------------------------- /pongo2/template_tests/empty.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/pongo2/template_tests/empty.tpl -------------------------------------------------------------------------------- /pongo2/template_tests/empty.tpl.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/pongo2/template_tests/empty.tpl.out -------------------------------------------------------------------------------- /pongo2/template_tests/expressions.tpl.out: -------------------------------------------------------------------------------- 1 | integers and complex expressions 2 | -90 3 | 90 4 | -90 5 | 90 6 | 531440999967.000000 7 | 8 | floats 9 | 5.500000 10 | 5.172841 11 | False 12 | True 13 | 14 | mul/div 15 | 10 16 | 10.000000 17 | 0 18 | 13.250000 19 | 0 20 | 0.500000 21 | 1000000.000000 22 | 23 | logic expressions 24 | False 25 | False 26 | True 27 | True 28 | False 29 | False 30 | True 31 | 32 | float comparison 33 | True 34 | False 35 | False 36 | True 37 | 38 | remainders 39 | 0 40 | True 41 | 1 42 | 43 | in/not in 44 | True 45 | True 46 | False 47 | False 48 | True 49 | True 50 | False 51 | True 52 | True 53 | False 54 | True 55 | False 56 | 57 | issue #48 (associativity for infix operators) 58 | 33 59 | 12 60 | 0 61 | 62 | issue #64 (uint comparison with int const) 63 | 8 64 | True 65 | False 66 | True 67 | True 68 | False 69 | False -------------------------------------------------------------------------------- /pongo2/template_tests/extends.tpl: -------------------------------------------------------------------------------- 1 | {% extends "inheritance/base.tpl" %} 2 | 3 | {% block content %}Extends' content{% endblock %} -------------------------------------------------------------------------------- /pongo2/template_tests/extends.tpl.out: -------------------------------------------------------------------------------- 1 | Start#This is base's bodyExtends' content#End -------------------------------------------------------------------------------- /pongo2/template_tests/extends_super.tpl: -------------------------------------------------------------------------------- 1 | {% extends "inheritance/base.tpl" %} 2 | 3 | {% block content %}{{ block.Super }}extends-level-1{% endblock %} -------------------------------------------------------------------------------- /pongo2/template_tests/extends_super.tpl.out: -------------------------------------------------------------------------------- 1 | Start#This is base's bodyDefault contentextends-level-1#End -------------------------------------------------------------------------------- /pongo2/template_tests/extends_super2.tpl: -------------------------------------------------------------------------------- 1 | {% extends "extends_super.tpl" %} 2 | 3 | {% block content %}{{ block.Super }}extends-level-2{% endblock %} -------------------------------------------------------------------------------- /pongo2/template_tests/extends_super2.tpl.out: -------------------------------------------------------------------------------- 1 | Start#This is base's bodyDefault contentextends-level-1extends-level-2#End -------------------------------------------------------------------------------- /pongo2/template_tests/filters-compilation.err: -------------------------------------------------------------------------------- 1 | {{ }} 2 | {{ (1 - 1 }} 3 | {{ 1|float: }} 4 | {{ "test"|non_existent_filter }} 5 | {{ "test"|"test" }} -------------------------------------------------------------------------------- /pongo2/template_tests/filters-compilation.err.out: -------------------------------------------------------------------------------- 1 | .*Expected either a number, string, keyword or identifier\. 2 | .*Closing bracket expected after expression 3 | .*Filter parameter required after ':'.* 4 | .*Filter 'non_existent_filter' does not exist\. 5 | .*Filter name must be an identifier\. -------------------------------------------------------------------------------- /pongo2/template_tests/filters-execution.err: -------------------------------------------------------------------------------- 1 | {{ -(true || false) }} 2 | {{ simple.func_add("test", 5) }} 3 | {% for item in simple.multiple_item_list %} {{ simple.func_add("test", 5) }} {% endfor %} 4 | {{ simple.func_variadic_sum_int("foo") }} 5 | -------------------------------------------------------------------------------- /pongo2/template_tests/filters-execution.err.out: -------------------------------------------------------------------------------- 1 | .*where: execution.*Negative sign on a non\-number expression 2 | .*Function input argument 0 of 'simple.func_add' must be of type int or \*pongo2.Value \(not string\). 3 | .*Function input argument 0 of 'simple.func_add' must be of type int or \*pongo2.Value \(not string\). 4 | .*Function variadic input argument of 'simple.func_variadic_sum_int' must be of type int or \*pongo2.Value \(not string\). 5 | -------------------------------------------------------------------------------- /pongo2/template_tests/firstof.tpl: -------------------------------------------------------------------------------- 1 | {% firstof doesnotexist 42 %} 2 | {% firstof doesnotexist "" %} 3 | {% firstof doesnotexist ""|safe %} 4 | {% firstof doesnotexist simple.uint 42 %} 5 | {% firstof doesnotexist "test" simple.number 42 %} 6 | {% firstof %} 7 | {% firstof "test" "test2" %} -------------------------------------------------------------------------------- /pongo2/template_tests/firstof.tpl.out: -------------------------------------------------------------------------------- 1 | 42 2 | <script>alert('xss');</script> 3 | 4 | 8 5 | test 6 | 7 | test -------------------------------------------------------------------------------- /pongo2/template_tests/function_calls_wrapper.tpl: -------------------------------------------------------------------------------- 1 | {{ simple.func_add(simple.func_add(5, 15), simple.number) + 17 }} 2 | {{ simple.func_add_iface(simple.func_add_iface(5, 15), simple.number) + 17 }} 3 | {{ simple.func_variadic("hello") }} 4 | {{ simple.func_variadic("hello, %s", simple.name) }} 5 | {{ simple.func_variadic("%d + %d %s %d", 5, simple.number, "is", 49) }} 6 | {{ simple.func_variadic_sum_int() }} 7 | {{ simple.func_variadic_sum_int(1) }} 8 | {{ simple.func_variadic_sum_int(1, 19, 185) }} 9 | {{ simple.func_variadic_sum_int2() }} 10 | {{ simple.func_variadic_sum_int2(2) }} 11 | {{ simple.func_variadic_sum_int2(1, 7, 100) }} -------------------------------------------------------------------------------- /pongo2/template_tests/function_calls_wrapper.tpl.out: -------------------------------------------------------------------------------- 1 | 79 2 | 79 3 | hello 4 | hello, john doe 5 | 5 + 42 is 49 6 | 0 7 | 1 8 | 205 9 | 0 10 | 2 11 | 108 -------------------------------------------------------------------------------- /pongo2/template_tests/if.tpl.out: -------------------------------------------------------------------------------- 1 | true 2 | simple != nil 3 | uint != 0 4 | float != 0.0 5 | !simple 6 | !simple.uint 7 | !simple.float 8 | text field in complex.post 9 | 5 in simple.intmap 10 | !0.0 11 | !0 12 | false 13 | 42 14 | yes 15 | yes 16 | true 17 | simple.float 18 | Elseif with no else -------------------------------------------------------------------------------- /pongo2/template_tests/ifchanged.tpl: -------------------------------------------------------------------------------- 1 | {% for comment in complex.comments2 %} 2 | {% ifchanged %}New comment from another user {{ comment.Author.Name }}{% endifchanged %} 3 | {% ifchanged comment.Author.Validated %} 4 | Validated changed to {{ comment.Author.Validated }} 5 | {% else %} 6 | Validated value not changed 7 | {% endifchanged %} 8 | {% ifchanged comment.Author.Name comment.Date %}Comment's author name or date changed{% endifchanged %} 9 | {% endfor %} -------------------------------------------------------------------------------- /pongo2/template_tests/ifchanged.tpl.out: -------------------------------------------------------------------------------- 1 | 2 | New comment from another user user1 3 | 4 | Validated changed to True 5 | 6 | Comment's author name or date changed 7 | 8 | 9 | 10 | Validated value not changed 11 | 12 | Comment's author name or date changed 13 | 14 | New comment from another user user3 15 | 16 | Validated changed to False 17 | 18 | Comment's author name or date changed 19 | -------------------------------------------------------------------------------- /pongo2/template_tests/includes.helper: -------------------------------------------------------------------------------- 1 | I'm {{ what_am_i }}{{ number }} -------------------------------------------------------------------------------- /pongo2/template_tests/includes.tpl: -------------------------------------------------------------------------------- 1 | Start '{% include "includes.helper" %}' End 2 | Start '{% include "includes.helper" if_exists %}' End 3 | Start '{% include "includes.helper" with what_am_i=simple.name only %}' End 4 | Start '{% include "includes.helper" with what_am_i=simple.name %}' End 5 | Start '{% include simple.included_file|lower with number=7 what_am_i="guest" %}' End 6 | Start '{% include "includes.helper.not_exists" if_exists %}' End 7 | Start '{% include simple.included_file_not_exists if_exists with number=7 what_am_i="guest" %}' End -------------------------------------------------------------------------------- /pongo2/template_tests/includes.tpl.out: -------------------------------------------------------------------------------- 1 | Start 'I'm 11' End 2 | Start 'I'm 11' End 3 | Start 'I'm john doe' End 4 | Start 'I'm john doe11' End 5 | Start 'I'm guest7' End 6 | Start '' End 7 | Start '' End -------------------------------------------------------------------------------- /pongo2/template_tests/inheritance/base.tpl: -------------------------------------------------------------------------------- 1 | {% extends "inheritance2/skeleton.tpl" %} 2 | 3 | {% block body %}This is base's body{% block content %}Default content{% endblock %}{% endblock %} -------------------------------------------------------------------------------- /pongo2/template_tests/inheritance/base2.tpl: -------------------------------------------------------------------------------- 1 | {% include "doesnotexist.tpl" %} 2 | -------------------------------------------------------------------------------- /pongo2/template_tests/inheritance/cycle_include.tpl: -------------------------------------------------------------------------------- 1 | Included '{{ cycleitem }}'. -------------------------------------------------------------------------------- /pongo2/template_tests/inheritance/inheritance2/skeleton.tpl: -------------------------------------------------------------------------------- 1 | Start#{% block body %}Default body{% endblock %}#End -------------------------------------------------------------------------------- /pongo2/template_tests/issues.tpl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/pongo2/template_tests/issues.tpl -------------------------------------------------------------------------------- /pongo2/template_tests/issues.tpl.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andeya/faygo/d2a5c3d487358866d1390c32dd00f5122b4a6fc8/pongo2/template_tests/issues.tpl.out -------------------------------------------------------------------------------- /pongo2/template_tests/lorem.tpl: -------------------------------------------------------------------------------- 1 | ----- 2 | {% lorem %} 3 | ----- 4 | {% lorem 10 %} 5 | ----- 6 | {% lorem 3 p %} 7 | ----- 8 | {% lorem 100 w %} 9 | ----- -------------------------------------------------------------------------------- /pongo2/template_tests/macro-compilation.err: -------------------------------------------------------------------------------- 1 | {% macro test_override() export %}{% endmacro %}{% macro test_override() export %}{% endmacro %} -------------------------------------------------------------------------------- /pongo2/template_tests/macro-compilation.err.out: -------------------------------------------------------------------------------- 1 | .*Another macro with name 'test_override' already exported. -------------------------------------------------------------------------------- /pongo2/template_tests/macro-execution.err: -------------------------------------------------------------------------------- 1 | {% macro number() export %}No number here.{% endmacro %}{{ number() }} -------------------------------------------------------------------------------- /pongo2/template_tests/macro-execution.err.out: -------------------------------------------------------------------------------- 1 | .*Context key name 'number' clashes with macro 'number'. -------------------------------------------------------------------------------- /pongo2/template_tests/macro.helper: -------------------------------------------------------------------------------- 1 | {% macro imported_macro(foo) export %}

Hey {{ foo }}!

{% endmacro %} 2 | {% macro imported_macro_void() export %}

Hello mate!

{% endmacro %} -------------------------------------------------------------------------------- /pongo2/template_tests/macro2.helper: -------------------------------------------------------------------------------- 1 | {% macro greeter_macro() export %} 2 | {% import "macro.helper" imported_macro, imported_macro_void %} 3 | One greeting: {{ imported_macro("Dirk") }} - {{ imported_macro_void() }} 4 | {% endmacro %} -------------------------------------------------------------------------------- /pongo2/template_tests/now.tpl: -------------------------------------------------------------------------------- 1 | {# The 'fake' argument exists to have tests for the now-tag; it will set the time to a specific date instead of now #} 2 | {% now "Mon Jan 2 15:04:05 -0700 MST 2006" fake %} -------------------------------------------------------------------------------- /pongo2/template_tests/now.tpl.out: -------------------------------------------------------------------------------- 1 | 2 | Wed Feb 5 18:31:45 +0000 UTC 2014 -------------------------------------------------------------------------------- /pongo2/template_tests/pongo2ctx.tpl: -------------------------------------------------------------------------------- 1 | {{ pongo2.version }} -------------------------------------------------------------------------------- /pongo2/template_tests/pongo2ctx.tpl.out: -------------------------------------------------------------------------------- 1 | dev -------------------------------------------------------------------------------- /pongo2/template_tests/sandbox-compilation.err: -------------------------------------------------------------------------------- 1 | {{ "hello"|banned_filter }} 2 | {% banned_tag %} 3 | {% include "../../test_not_existent" %} -------------------------------------------------------------------------------- /pongo2/template_tests/sandbox-compilation.err.out: -------------------------------------------------------------------------------- 1 | .*Usage of filter 'banned_filter' is not allowed \(sandbox restriction active\). 2 | .*Usage of tag 'banned_tag' is not allowed \(sandbox restriction active\). 3 | \[Error \(where: fromfile\) | Line 1 Col 12 near '../../test_not_existent'\] open : no such file or directory -------------------------------------------------------------------------------- /pongo2/template_tests/sandbox.tpl: -------------------------------------------------------------------------------- 1 | {{ "hello"|unbanned_filter }} 2 | {% unbanned_tag %} 3 | {% include temp_file %} -------------------------------------------------------------------------------- /pongo2/template_tests/sandbox.tpl.out: -------------------------------------------------------------------------------- 1 | hello 2 | hello 3 | Hello from pongo2 -------------------------------------------------------------------------------- /pongo2/template_tests/set.tpl: -------------------------------------------------------------------------------- 1 | {% set new_var = "hello" %}{{ new_var }} 2 | {% block content %}{% set new_var = "world" %}{{ new_var }}{% endblock %} 3 | {{ new_var }}{% for item in simple.misc_list %} 4 | {% set new_var = item %}{{ new_var }}{% endfor %} 5 | {{ new_var }} 6 | {% set car=someUndefinedVar %}{{ car.Drive }}No Panic -------------------------------------------------------------------------------- /pongo2/template_tests/set.tpl.out: -------------------------------------------------------------------------------- 1 | hello 2 | world 3 | world 4 | Hello 5 | 99 6 | 3.140000 7 | good 8 | world 9 | No Panic -------------------------------------------------------------------------------- /pongo2/template_tests/spaceless.tpl: -------------------------------------------------------------------------------- 1 | {% spaceless %} 2 |
3 |

4 | This is a test! Mail me at 5 | 6 | 7 | mail@example.tld 8 | 9 |

10 | 11 |

12 | 13 | Yep! 14 | 15 |

16 | 17 |
18 | {% endspaceless %} -------------------------------------------------------------------------------- /pongo2/template_tests/spaceless.tpl.out: -------------------------------------------------------------------------------- 1 | 2 |

3 | This is a test! Mail me at 4 | 5 | 6 | mail@example.tld 7 |

8 | 9 | Yep! 10 | 11 |

12 | -------------------------------------------------------------------------------- /pongo2/template_tests/ssi.helper: -------------------------------------------------------------------------------- 1 | {{ number }} 2 | {{ "hello" }} -------------------------------------------------------------------------------- /pongo2/template_tests/ssi.tpl: -------------------------------------------------------------------------------- 1 | {% ssi "ssi.helper" %} 2 | {% ssi "ssi.helper" parsed %} -------------------------------------------------------------------------------- /pongo2/template_tests/ssi.tpl.out: -------------------------------------------------------------------------------- 1 | {{ number }} 2 | {{ "hello" }} 3 | 11 4 | hello -------------------------------------------------------------------------------- /pongo2/template_tests/tag_filter.tpl: -------------------------------------------------------------------------------- 1 | {% filter lower %}This is a nice test; let's see whether it works. Foobar. {{ simple.xss }}{% endfilter %} 2 | 3 | {% filter truncatechars:10|lower|length %}This is a nice test; let's see whether it works. Foobar. {{ simple.number }}{% endfilter %} -------------------------------------------------------------------------------- /pongo2/template_tests/tag_filter.tpl.out: -------------------------------------------------------------------------------- 1 | this is a nice test; let's see whether it works. foobar. <script>alert("uh oh");</script> 2 | 3 | 10 -------------------------------------------------------------------------------- /pongo2/template_tests/tags-compilation.err: -------------------------------------------------------------------------------- 1 | {% if true %} 2 | {% if (1) . %}{% endif %} 3 | {% block test %}{% block test %}{% endblock %}{% endblock %} 4 | {% block test %}{% block test %}{% endblock %}{% endblock test2 %} 5 | {% block test %}{% block test2 %}{% endblock xy %}{% endblock test %} 6 | {% block test %}{% block test2 %}{% endblock test2 test3 %}{% endblock test %} -------------------------------------------------------------------------------- /pongo2/template_tests/tags-compilation.err.out: -------------------------------------------------------------------------------- 1 | .*Unexpected EOF, expected tag elif or else or endif. 2 | .*If-condition is malformed. 3 | .*Block named 'test' already defined.* 4 | .*Name for 'endblock' must equal to 'block'\-tag's name \('test' != 'test2'\). 5 | .*Name for 'endblock' must equal to 'block'-tag's name \('test2' != 'xy'\). 6 | .*Either no or only one argument \(identifier\) allowed for 'endblock'. -------------------------------------------------------------------------------- /pongo2/template_tests/template_sets.tpl: -------------------------------------------------------------------------------- 1 | Globals 2 | {{ this_is_a_global_variable }} -------------------------------------------------------------------------------- /pongo2/template_tests/template_sets.tpl.out: -------------------------------------------------------------------------------- 1 | Globals 2 | this is a global text -------------------------------------------------------------------------------- /pongo2/template_tests/templatetag.tpl: -------------------------------------------------------------------------------- 1 | {% templatetag openblock %} url 'entry_list' {% templatetag closeblock %} 2 | {% templatetag openvariable %}{% templatetag closevariable %} 3 | {% templatetag openbrace %}{% templatetag closebrace %} 4 | {% templatetag opencomment %}{% templatetag closecomment %} -------------------------------------------------------------------------------- /pongo2/template_tests/templatetag.tpl.out: -------------------------------------------------------------------------------- 1 | {% url 'entry_list' %} 2 | {{}} 3 | {} 4 | {##} -------------------------------------------------------------------------------- /pongo2/template_tests/variables-execution.err: -------------------------------------------------------------------------------- 1 | {{ simple.one_item_list.2 }} 2 | {{ simple.fixed_item_list.5 }} 3 | {{ simple.str.10 }} 4 | -------------------------------------------------------------------------------- /pongo2/template_tests/variables-execution.err.out: -------------------------------------------------------------------------------- 1 | .*simple.one_item_list.2 is out of range \(type: slice, length: 1\) 2 | .*simple.fixed_item_list.5 is out of range \(type: array, length: 4\) 3 | .*simple.str.10 is out of range \(type: string, length: 6\) 4 | -------------------------------------------------------------------------------- /pongo2/template_tests/variables.tpl: -------------------------------------------------------------------------------- 1 | {{ 1 }} 2 | {{ -5 }} 3 | {{ "hallo" }} 4 | {{ true }} 5 | {{ false }} 6 | {{ simple.uint }} 7 | {{ simple.nil }} 8 | {{ simple.str }} 9 | {{ simple.bool_false }} 10 | {{ simple.bool_true }} 11 | {{ simple.uint }} 12 | {{ simple.uint|integer }} 13 | {{ simple.uint|float }} 14 | {{ simple.multiple_item_list.4 }} -------------------------------------------------------------------------------- /pongo2/template_tests/variables.tpl.out: -------------------------------------------------------------------------------- 1 | 1 2 | -5 3 | hallo 4 | True 5 | False 6 | 8 7 | 8 | string 9 | False 10 | True 11 | 8 12 | 8 13 | 8.000000 14 | 5 -------------------------------------------------------------------------------- /pongo2/template_tests/verbatim.tpl: -------------------------------------------------------------------------------- 1 | .{{ simple.number }}{% verbatim %} 2 |