-
Notifications
You must be signed in to change notification settings - Fork 42
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 #16 from lixiaojun629/develop
Develop ULB
- Loading branch information
Showing
60 changed files
with
5,015 additions
and
249 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,4 +1,4 @@ | ||
export VERSION=0.1.7 | ||
export VERSION=0.1.8 | ||
|
||
.PHONY : build | ||
build: | ||
|
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 |
---|---|---|
|
@@ -83,9 +83,9 @@ Taking create uhost in Nigeria (region: air-nigeria) and bind a public IP as an | |
First to create an uhost instance: | ||
|
||
``` | ||
$ ucloud uhost create --cpu 1 --memory 1 --password mypassword123 --image-id uimage-fya3qr | ||
$ ucloud uhost create --cpu 1 --memory 1 --password **** --image-id uimage-fya3qr | ||
UHost:[uhost-tr1eau] created successfully! | ||
UHost:[uhost-tr1e] created successfully! | ||
``` | ||
|
||
*Note* | ||
|
@@ -116,7 +116,7 @@ Configure the GlobalSSH to the uhost instance and login the instance via GlobalS | |
|
||
``` | ||
$ ucloud gssh create --location Washington --target-ip 152.32.140.92 | ||
ResourceID: uga-pdhxvs | ||
gssh[uga-0psxxx] created | ||
$ ssh [email protected] | ||
[email protected]'s password: password of the uhost instance | ||
|
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,18 +1,27 @@ | ||
// Reference https://github.com/sindresorhus/ansi-escapes | ||
//Package ansi reference https://github.com/sindresorhus/ansi-escapes | ||
package ansi | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
const ESC = "\x1b[" | ||
const OSC = "\x1b]" | ||
const BEL = "\x07" | ||
const SEP = ";" | ||
const csi = "\x1b[" | ||
|
||
var CursorLeft = fmt.Sprintf("%sG", ESC) | ||
var EraseDown = fmt.Sprintf("%sJ", ESC) | ||
// const OSC = "\x1b]" | ||
// const BEL = "\x07" | ||
const sep = ";" | ||
|
||
//CursorLeft move cursor to the left side | ||
var CursorLeft = fmt.Sprintf("%sG", csi) | ||
|
||
//EraseDown Erase the screen from the current line down to the bottom of the | ||
var EraseDown = fmt.Sprintf("%sJ", csi) | ||
|
||
func CursorUp(count int) string { | ||
return fmt.Sprintf("%s%dA", ESC, count) | ||
return fmt.Sprintf("%s%dA", csi, count) | ||
} | ||
|
||
//CursorTo | ||
func CursorTo(x, y int) string { | ||
return fmt.Sprintf("%s%d;%dH", csi, y+1, x+1) | ||
} |
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
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
Oops, something went wrong.