Go date is the number of termtables

Time:2021-7-30

Pipe/ h2>

The number of points from the storage tank:? a>termtablesTo process the export and import of the data, please refer to the output of the power supply or the system management data at the place where the user is located at the time of import, according to the verification and test, if it is the store where the user is located? a href=” https://link.segmentfault.com/?url=https%3A%2F%2Fdarjun.github.io%2F2021%2F06%2F24%2Fgodailylib%2Fdateparse%2F ” rel=”nofollow”>dateparseAt the same time, the air flow is controlled to these temperatures/ p>

Quick call/ h2>

This document code uses go modules/ p>

To create and publish an item:/ p>

$ mkdir termtables && cd termtables
$ go mod init github.com/darjun/go-daily-lib/termtables

InstallationtermtablesBed fine

$ go get -u github.com/scylladb/termtables

What is the reason? Code > termtablesgithub.com/apcera/termtablesThen, according to the conclusion of the agreement, the information received before deleting the applicable item is another person? Result of fork/ p>

Use:/ p>

package main

import (
  "fmt"
  "github.com/scylladb/termtables"
)

func main() {
  t := termtables.CreateTable()
  t.AddHeaders("User", "Age")
  t.AddRow("dj", 18)
  t.AddRow("darjun", 30)
  fmt.Println(t.Render())
}

Operation:/ p>

$ go run main.go
+--------+-----+
| User   | Age |
+--------+-----+
| dj     | 18  |
| darjun | 30  |
+--------+-----+

Use the option of Party A and Notermtables.CreateTable()To create a standard device, you can use the corresponding deviceAddHeader()Add additional information and then adjust it? Code > addrow() run to add data and adjust the power if necessary? Code > render() returns the following string characters/ p>

Mode spinning

To process the text of a problem:? Code > termtables shipping support? HTML and? The effect of the markdown standard needs to be adjusted according to the requirements of the electronic standardSetModeHTML()/SetModeMarkdown()New settings ā Screen number? What/ p>

func main() {
  t := termtables.CreateTable()
  t.AddHeaders("User", "Age")
  t.AddRow("dj", 18)
  t.AddRow("darjun", 30)
  fmt.Println("HTML:")
  t.SetModeHTML()
  fmt.Println(t.Render())

  fmt.Println("Markdown:")
  t.SetModeMarkdown()
  fmt.Println(t.Render())
}

Operation:/ p>

$ go run main.go
HTML:
<table class="termtable">
<thead>
<tr><th>User</th><th>Age</th></tr>
</thead>
<tbody>
<tr><td>dj</td><td>18</td></tr>
<tr><td>darjun</td><td>30</td></tr>
</tbody>
</table>

Markdown:
| User   | Age |
| ------ | --- |
| dj     | 18  |
| darjun | 30  |

The output screen can be used in different places? The markdown / HTML file is missing/ p>

Results

On the mattress, please В There is only one child х You already have? Code > termtables. The number of words that have been asked is not more than one? Code > termtables the amount should be edited by the processing department or the processing department, and the field should be specified. If there is a need to print the data contained in the technical report, please do not refer to the test? Code > termtables/ p>

Extremely у If you find a go request that is self-contained or self-contained, you can? Go date? GitHub provider? Issue disk

Yes/ h2>

  1. Go date? GitHub? a href=” https://link.segmentfault.com/?url=https%3A%2F%2Fgithub.com%2Fdarjun%2Fgo -daily-lib” rel=”nofollow”> https://github.com/darjun/go-daily-lib
  2. Termtables GitHub? a>github.com/scylladb/termtables

Or/ h2>

My card:? a href=” https://link.segmentfault.com/?url=https%3A%2F%2Fdarjun.github.io ” rel=”nofollow”> https://darjun.github.io

In case of any contract between the company and the customer, it shall be handled in accordance with the contract