I bet requests (and curl) encodes the params as multipart/form-data, NOT
query string.
Do the same: https://play.golang.org/p/L4YryKNjju4
remb...@gmail.com a következőt írta (2020. szeptember 19., szombat,
20:44:54 UTC+2):
> I am trying to call a simple api by using golang. But, each time it
func clearCurrentLine(){
fmt.Print("\n\033[1A\033[K")
}
[Joop Kiefte - Chat @
Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=owk7j)
[owk7j]
On September 19, 2020 at 20:04 GMT, Joop Kiefte wrote:
package main
import "fmt"
func main() {
fmt.Println("Test 1")
package main
import "fmt"
func main() {
fmt.Println("Test 1")
fmt.Println("Test 2")
fmt.Print("\033[1A\033[K") //one up, remove line (should work after the newline
of the Println)
}
Maybe this piece of code helps you?
[Joop Kiefte - Chat @
You can create your own writer and overwrite os.Stdout/Stderr (just supply your
own write method with the appropriate before/after hooks)
Sent from my iPhone
> On Sep 19, 2020, at 12:38 PM, Alexander Mills
> wrote:
>
> Forgive me for this pigeon code, I am looking to do something like:
>
>
Yeah sure so it looks like:
clearCurrentLine() // clears the previous status line
fmt.Println("foo")
writeStatusLine() // writes new status line
where clearCurrentLine() is just like
func clearCurrentLine(){
//fmt.Printf("\033[0;") // clear current line
//fmt.Printf("\033[2K\r%d",0);
Forgive me for this pigeon code, I am looking to do something like:
os.Stdout.BeforeWrite(func (){
});
os.Stderr.AfterWrite(func(){
})
so I can hook into the system and clear the terminal before hand, and write
a status line, after wards. Is this possible?
--
You received this message
Can you give some example code?
[Joop Kiefte - Chat @
Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=owiru)
[owiru]
On September 19, 2020 at 19:29 GMT, Alex Mills wrote:
Yeah I tried all those ANSI codes, nothing seems to work :(
On Sat, Sep 19, 2020 at 11:59 AM Joop
Yeah I tried all those ANSI codes, nothing seems to work :(
On Sat, Sep 19, 2020 at 11:59 AM Joop Kiefte wrote:
> I tend to do that with ANSI terminal codes, there are pages that explain
> all codes
>
> *Joop Kiefte* - Chat @ Spike
>
I tend to do that with ANSI terminal codes, there are pages that explain all
codes
[Joop Kiefte - Chat @
Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=owh4j)
[owh4j]
On September 19, 2020 at 18:44 GMT, Alex Mills wrote:
Using Node.js with several projects I can use
Using Node.js with several projects I can use these:
const rl = require('readline');
process.stdout.write('current line')
rl.clearLine(process.stdout);
rl.cursorTo(process.stdout, 0);
this will clear the current line in the terminal, so I can achieve
something like a status line, but I cannot
I am trying to call a simple api by using golang. But, each time it sends
me html content of login page instead of actual data. But same get request
works from python and curl.
package main
import (
"fmt"
"io/ioutil"
"net/http"
"os"
)
func main() {
client := {}
req, err :=
Hi Paul!
Thank you for taking the time to reply.
On Friday, September 18, 2020 at 11:33:49 AM UTC+2 Paul Jolly wrote:
> Hi Andi,
>
> > 1) I cannot do go install tools.go:
>
> go install takes main packages as arguments, so no, this will not
> work. The tools.go file (like the example you
12 matches
Mail list logo