Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #349 from pterm/348-update-examples-and-docs-updat…
…e-generation
- Loading branch information
Showing
137 changed files
with
10,565 additions
and
1,019 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 @@ | ||
# area/demo | ||
|
||
![Animation](animation.svg) | ||
|
||
```go | ||
package main | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/pterm/pterm" | ||
) | ||
|
||
func main() { | ||
pterm.Info.Println("The previous text will stay in place, while the area updates.") | ||
pterm.Print("\n\n") // Add two new lines as spacer. | ||
|
||
area, _ := pterm.DefaultArea.WithCenter().Start() // Start the Area printer, with the Center option. | ||
for i := 0; i < 10; i++ { | ||
str, _ := pterm.DefaultBigText.WithLetters(pterm.NewLettersFromString(time.Now().Format("15:04:05"))).Srender() // Save current time in str. | ||
area.Update(str) // Update Area contents. | ||
time.Sleep(time.Second) | ||
} | ||
area.Stop() | ||
} | ||
|
||
``` |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.