-
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6236b9
commit b55897b
Showing
10 changed files
with
113 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
* [Maroto V2](README.md?id=home) | ||
* [Example](v2/example.md) | ||
* [Documentation](v2/documentation.md?id=documentation) | ||
* [1 - Creating Maroto](v2/documentation.md?id=_1-creating-maroto) | ||
* [1.1 - Adding Metrics Decorator](v2/documentation.md?id=_11-adding-metrics-decorator) | ||
* **Documentation** | ||
* [Basics](v2/basics.md) | ||
* [Config Builder](v2/configbuilder.md) | ||
* [Maroto V1 (Deprecated)](v1/README.md?id=deprecated) | ||
* [Documentation](v1/documentation.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/johnfercher/maroto/pkg/v2" | ||
"log" | ||
) | ||
|
||
func main() { | ||
m := v2.NewMaroto() | ||
|
||
// Do things | ||
|
||
document, err := m.Generate() | ||
if err != nil { | ||
log.Fatal(err.Error()) | ||
} | ||
|
||
bytes := document.GetBase64() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/johnfercher/maroto/pkg/v2" | ||
"github.com/johnfercher/maroto/pkg/v2/config" | ||
) | ||
|
||
func main() { | ||
cfg := config.NewBuilder(). | ||
WithThreadPool(10). | ||
Build() | ||
|
||
m := v2.NewMaroto(cfg) | ||
|
||
// Generate | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/johnfercher/maroto/pkg/v2" | ||
"log" | ||
) | ||
|
||
func main() { | ||
m := v2.NewMaroto() | ||
|
||
// Do things | ||
|
||
document, err := m.Generate() | ||
if err != nil { | ||
log.Fatal(err.Error()) | ||
} | ||
|
||
err = document.Save("file.pdf") | ||
if err != nil { | ||
log.Fatal(err.Error()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Parallel | ||
generate -> avg: 64.55ms, executions: [64.55ms] | ||
add_row -> avg: 1163.96ns, executions: [0.51μs, 0.95μs, 0.85μs, 6.19μs, 0.80μs, 0.95μs, 0.77μs, 0.72μs, 0.68μs, 0.88μs, 2.75μs, 1.08μs, 0.78μs, 0.73μs, 0.76μs, 0.74μs, 0.74μs, 4.19μs, 0.74μs, 0.74μs, 3.65μs, 0.79μs, 0.73μs, 0.77μs, 0.70μs, 0.73μs, 0.81μs, 0.76μs, 0.71μs, 0.82μs, 0.70μs, 0.74μs, 0.75μs, 1.21μs, 1.15μs, 0.96μs, 4.18μs, 1.55μs, 0.90μs, 0.85μs, 0.83μs, 0.68μs, 0.65μs, 3.29μs, 0.64μs, 0.79μs, 0.98μs, 0.72μs, 1.97μs, 1.01μs, 1.52μs, 0.81μs, 0.71μs, 4.09μs, 0.75μs, 0.71μs, 0.67μs, 0.68μs, 0.69μs, 0.66μs, 0.64μs, 0.69μs, 0.67μs, 0.66μs, 0.71μs, 1.66μs, 0.73μs, 0.69μs, 1.50μs, 1.23μs, 4.92μs, 1.04μs, 0.83μs, 0.81μs, 2.75μs, 1.10μs, 1.16μs, 0.82μs, 3.88μs, 0.76μs, 0.79μs, 0.88μs, 0.80μs, 0.88μs, 0.77μs, 1.29μs, 0.70μs, 0.74μs, 0.74μs, 0.75μs, 0.76μs, 0.77μs, 0.68μs, 0.75μs, 0.74μs, 0.97μs, 0.98μs, 0.76μs, 0.78μs, 0.72μs] | ||
|
||
Sequential | ||
generate -> avg: 198.09ms, executions: [198.09ms] | ||
add_row -> avg: 1409.42ns, executions: [0.82μs, 1.10μs, 0.86μs, 7.45μs, 0.80μs, 0.89μs, 0.81μs, 0.69μs, 0.80μs, 0.83μs, 2.67μs, 0.65μs, 0.68μs, 0.69μs, 0.67μs, 0.74μs, 2.26μs, 3.88μs, 0.71μs, 0.66μs, 5.38μs, 1.10μs, 1.08μs, 0.78μs, 1.25μs, 1.52μs, 1.13μs, 0.97μs, 0.76μs, 0.81μs, 0.75μs, 1.23μs, 0.85μs, 1.49μs, 0.97μs, 0.76μs, 1.45μs, 2.02μs, 1.03μs, 0.88μs, 0.74μs, 0.78μs, 1.14μs, 0.69μs, 0.74μs, 0.75μs, 1.02μs, 0.69μs, 1.01μs, 0.75μs, 3.09μs, 0.66μs, 0.68μs, 3.36μs, 0.72μs, 0.65μs, 0.65μs, 0.77μs, 3.73μs, 0.70μs, 0.65μs, 0.76μs, 0.75μs, 1.46μs, 1.75μs, 2.07μs, 1.49μs, 0.78μs, 2.53μs, 1.56μs, 4.48μs, 0.89μs, 0.85μs, 1.35μs, 0.99μs, 1.47μs, 1.16μs, 1.50μs, 7.34μs, 1.51μs, 1.69μs, 1.44μs, 1.22μs, 1.67μs, 1.05μs, 8.24μs, 0.78μs, 0.78μs, 0.79μs, 0.71μs, 0.76μs, 0.69μs, 0.76μs, 0.96μs, 0.77μs, 0.77μs, 0.85μs, 1.44μs, 1.09μs, 0.93μs] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generating PDF | ||
|
||
**Code** | ||
|
||
[filename](../assets/go/save.go ':include :type=code') | ||
|
||
## Retrieving Bytes | ||
|
||
**Code** | ||
|
||
[filename](../assets/go/bytes.go ':include :type=code') | ||
|
||
## Retrieving Base64 | ||
|
||
**Code** | ||
|
||
[filename](../assets/go/base64.go ':include :type=code') | ||
|
||
## Using Metrics Decorator | ||
|
||
**Code** | ||
|
||
[filename](../assets/go/metrics.go ':include :type=code') | ||
|
||
**Response** | ||
|
||
[filename](../assets/text/report.txt ':include :type=code') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Config Builder | ||
|
||
## Parallelism | ||
**Code** | ||
|
||
[filename](../assets/go/parallel.go ':include :type=code') | ||
|
||
**Response** | ||
|
||
[filename](../assets/text/parallel.txt ':include :type=code') |
This file was deleted.
Oops, something went wrong.