This repo contains three Go+ classfiles. They are yap (a HTTP Web Framework), yaptest (a HTTP Test Framework) and ydb (a Go+ Database Framework). The

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-11-29 16:30:08

This repo contains three Go+ classfiles. They are yap (a HTTP Web Framework), yaptest (a HTTP Test Framework) and ydb (a Go+ Database Framework).

The classfile yap has the file suffix .yap. The classfile yaptest has the file suffix _ytest.gox. And the classfile ydb has the file suffix _ydb.gox.

YAP uses filenames to define routes. get.yap's route is get "/" (GET homepage), and get_p_#id.yap's route is get "/p/:id" (In fact, the filename can also be get_p_:id.yap, but it is not recommended because : is not allowed to exist in filenames under Windows).

The directive testServer creates the web server by net/http/httptest and obtained a random port as the service address. Then it calls the directive host to map the random service address to foo.com. This makes all other code no need to changed.

Leave a Comment