mirror of
https://github.com/MontFerret/ferret.git
synced 2026-06-20 01:17:53 +02:00
Updated code formatting
This commit is contained in:
@@ -108,7 +108,6 @@ Please use `exit` or `Ctrl-D` to exit this program.
|
|||||||
```ferret``` is a very modular system and therefore, can be easily be embedded into your Go application.
|
```ferret``` is a very modular system and therefore, can be easily be embedded into your Go application.
|
||||||
|
|
||||||
```go
|
```go
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -179,14 +178,13 @@ func getTopTenTrendingTopics() ([]*Topic, error) {
|
|||||||
|
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Extensibility
|
## Extensibility
|
||||||
|
|
||||||
That said, ```ferret``` is a very modular system which also allows not only embed it, but extend its standard library.
|
That said, ```ferret``` is a very modular system which also allows not only embed it, but extend its standard library.
|
||||||
|
|
||||||
```
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -272,9 +270,7 @@ func getStrings() ([]string, error) {
|
|||||||
On top of that, you can completely turn off standard library, by passing the following option:
|
On top of that, you can completely turn off standard library, by passing the following option:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
|
|
||||||
comp := compiler.New(compiler.WithoutStdlib())
|
comp := compiler.New(compiler.WithoutStdlib())
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
And after that, you can easily provide your own implementation of functions from standard library.
|
And after that, you can easily provide your own implementation of functions from standard library.
|
||||||
@@ -289,7 +285,6 @@ import (
|
|||||||
"github.com/MontFerret/ferret/pkg/stdlib/strings"
|
"github.com/MontFerret/ferret/pkg/stdlib/strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
comp := compiler.New(compiler.WithoutStdlib())
|
comp := compiler.New(compiler.WithoutStdlib())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user