From 0c1ef72285b17474f72ef8dbbfc715f7d943bf6f Mon Sep 17 00:00:00 2001 From: xushiwei Date: Thu, 20 Jun 2024 00:44:15 +0800 Subject: [PATCH] cjson/sqlite README: remove install from source --- c/c.go | 5 ----- c/cjson/README.md | 22 +++++----------------- c/sqlite/README.md | 21 ++++----------------- c/sqlite/_demo/sqlitedemo/demo.go | 3 ++- 4 files changed, 11 insertions(+), 40 deletions(-) diff --git a/c/c.go b/c/c.go index bf856138..2e47383e 100644 --- a/c/c.go +++ b/c/c.go @@ -196,11 +196,6 @@ func Fflush(fp FilePtr) Int // ----------------------------------------------------------------------------- -//go:linkname Remove C.remove -func Remove(path *Char) Int - -// ----------------------------------------------------------------------------- - //go:linkname Time C.time func Time(*int32) int32 diff --git a/c/cjson/README.md b/c/cjson/README.md index 2c257f46..58911541 100644 --- a/c/cjson/README.md +++ b/c/cjson/README.md @@ -1,31 +1,19 @@ LLGo wrapper of DaveGamble/cJSON ===== -[![Build Status](https://github.com/goplus/cjson/actions/workflows/go.yml/badge.svg)](https://github.com/goplus/cjson/actions/workflows/go.yml) -[![GitHub release](https://img.shields.io/github/v/tag/goplus/cjson.svg?label=release)](https://github.com/goplus/cjson/releases) -[![GoDoc](https://pkg.go.dev/badge/github.com/goplus/cjson.svg)](https://pkg.go.dev/github.com/goplus/cjson) -[![Compiler](https://img.shields.io/badge/compiler-llgo-darkgreen.svg)](https://github.com/goplus/llgo) -[![Language](https://img.shields.io/badge/language-Go+-blue.svg)](https://github.com/goplus/gop) ## How to install + ### on macOS (Homebrew) + ```sh brew install cjson ``` -### on linux + +### on Linux (Debian/Ubuntu) + ```sh apt-get install -y libcjson-dev ``` -### from source code -```sh -git clone https://github.com/goplus/cjson.git -cd cjson -git submodule init -git submodule update -mkdir build.dir -cd build.dir -cmake ../cJSON -sudo make install -``` ## Demos diff --git a/c/sqlite/README.md b/c/sqlite/README.md index 37927d06..65c74f02 100644 --- a/c/sqlite/README.md +++ b/c/sqlite/README.md @@ -1,32 +1,19 @@ LLGo wrapper of sqlite ===== -[![Build Status](https://github.com/goplus/sqlite/actions/workflows/go.yml/badge.svg)](https://github.com/goplus/sqlite/actions/workflows/go.yml) -[![GitHub release](https://img.shields.io/github/v/tag/goplus/sqlite.svg?label=release)](https://github.com/goplus/sqlite/releases) -[![GoDoc](https://pkg.go.dev/badge/github.com/goplus/sqlite.svg)](https://pkg.go.dev/github.com/goplus/sqlite) -[![Compiler](https://img.shields.io/badge/compiler-llgo-darkgreen.svg)](https://github.com/goplus/llgo) -[![Language](https://img.shields.io/badge/language-Go+-blue.svg)](https://github.com/goplus/gop) ## How to install ### on macOS (Homebrew) + ```sh brew install sqlite3 ``` -### on linux + +### on Linux (Debian/Ubuntu) + ```sh apt-get install -y libsqlite3-dev ``` -### from source code -```sh -git clone https://github.com/goplus/sqlite.git -cd sqlite -git submodule init -git submodule update -mkdir build.dir -cd build.dir -../sqlite/configure --enable-shared -sudo make install -``` ## Demos diff --git a/c/sqlite/_demo/sqlitedemo/demo.go b/c/sqlite/_demo/sqlitedemo/demo.go index a8d0deaf..c78ed2a3 100644 --- a/c/sqlite/_demo/sqlitedemo/demo.go +++ b/c/sqlite/_demo/sqlitedemo/demo.go @@ -2,11 +2,12 @@ package main import ( "github.com/goplus/llgo/c" + "github.com/goplus/llgo/c/os" "github.com/goplus/llgo/c/sqlite" ) func main() { - c.Remove(c.Str("test.db")) + os.Remove(c.Str("test.db")) db, err := sqlite.Open(c.Str("test.db")) check(err, db, "sqlite: Open")