]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
modules/doc: fixed typos
authorMarek Vavruša <marek.vavrusa@nic.cz>
Wed, 18 Mar 2015 12:44:27 +0000 (13:44 +0100)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Wed, 18 Mar 2015 12:44:27 +0000 (13:44 +0100)
modules/README.md
modules/gostats/gostats.go

index c3d7901316adb03c1483f36996c53093529af908..a7b756e783002e337671551a5ef79e458358c879 100644 (file)
@@ -255,7 +255,7 @@ static char* cached_size(struct kr_context *ctx, struct kr_module *module, const
     }
 
     /* For the sake of brevity... */
-    asprintf(&result, "{ "cache_size": %d }\n", kr_cache_count(&txn));
+    asprintf(&result, "{ \"size\": %d }\n", kr_cache_count(&txn));
 
     kr_cache_txn_abort(&txn);
     return result;
@@ -265,7 +265,7 @@ struct kr_prop *cached_props(void)
 {
        static struct kr_prop prop_list[] = {
                /* Callback,   Name,   Description */
-               { &cache_size, "size", "Return number of cached records.", },
+               { &cached_size, "size", "Return number of cached records.", },
                { NULL, NULL, NULL }
        };
        return prop_list;
@@ -280,6 +280,7 @@ Once you load the module, you can call the module property from the interactive
 ```sh
 $ kresolved
 ...
+[system] started in interactive mode, type 'help'
 > load cached
 > cached.cached_size
 { "cache_size": 53 }
@@ -291,4 +292,4 @@ $ kresolved
 [processing]: https://gitlab.labs.nic.cz/labs/knot/tree/master/src/libknot/processing
 [golang-syntax]: http://blog.golang.org/gos-declaration-syntax
 [cgo]: http://golang.org/cmd/cgo/
-[gccgo]: https://golang.org/doc/install/gccgo
\ No newline at end of file
+[gccgo]: https://golang.org/doc/install/gccgo
index c5b04597ee1e3b2a636d82c6349b73ef8ed83746..6a4d89b219f01600c3373afbaddafff5d52e1cf9 100644 (file)
@@ -31,7 +31,7 @@ func Deinit(module *C.struct_kr_module) C.int {
 }
 
 func Begin(ctx *C.knot_layer_t, param unsafe.Pointer) C.int {
-       ctx->data = param
+       ctx.data = param
        return 0
 }
 
@@ -43,4 +43,4 @@ func Finish(ctx *C.knot_layer_t) C.int {
 
 func Layer() *C.knot_layer_api_t {
        return C._layer()
-}
\ No newline at end of file
+}