Giter Club home page Giter Club logo

go-cookbook's Introduction

go-cookbook's People

Contributors

chilts avatar jubnzv avatar kjk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-cookbook's Issues

This site can’t be reached

I'm following the free-ssl-certificates example, changed allowedHost to mine and httpPort to :80, and it is working, at least for the http part. However, the https part is not working.

When the program starts, it prints on the console:
Starting HTTP server on :80
Starting HTTPS server on :443

When using the https connection,

I'm getting

This site can’t be reached
site took too long to respond.

Checking back to the console, I see:

2019/05/07 11:11:11 http: TLS handshake error from 99.xx.xx.221:40820: context deadline exceeded
2019/05/07 11:11:11 http: TLS handshake error from 99.xx.xx.221:40826: acme/autocert: missing certificate
2019/05/07 11:11:11 http: TLS handshake error from 99.xx.xx.221:40828: acme/autocert: missing certificate
2019/05/07 11:11:11 http: TLS handshake error from 99.xx.xx.221:40822: acme/autocert: missing certificate
2019/05/07 11:11:11 http: TLS handshake error from 99.xx.xx.221:40830: acme/autocert: missing certificate
2019/05/07 11:11:11 http: TLS handshake error from 99.xx.xx.221:40832: acme/autocert: missing certificate
2019/05/07 11:11:11 http: TLS handshake error from 99.xx.xx.221:40860: acme/autocert: missing certificate
2019/05/07 11:11:11 http: TLS handshake error from 99.xx.xx.221:40824: acme/autocert: missing certificate

How to make it works? thx

Once again, I have a real site whose DNS name matches allowedHost. I've changed allowedHost to match, and it is working (by visiting my true DNS name) -- no complaining from the log, even with https.

03-live-progress-and-capture-v1.go looks wrong

New to golang, so bare with me if I don't understand some parts correctly :)
03-live-progress-and-capture-v1.go looks wrong with regards to parallelism:
in line 47 the cmd is actually started, while only later two goroutines try to capture stdOut and stdErr.
Hence if your computer is slow or loaded, the cmd is already finished and copyAndCapture will fail to get a hold on anything.
If I add a simple time.Sleep(100 * time.Millisecond) after the cmd.Start() to simulate slowness, I get two error behaviours from time to time:

  1. rarely, but still sometimes copyAndCapture will fail to read (in line 19) but get an error read |0: file already closed
  2. most of the times copyAndCapture will miss the output (I didn't understand how that happens): the output is visible in my shell, but outStr will be empty, hence no output from the captured string

Now this can be fixed in practice by shifting cmd.Start() e.g. to line 56, after the goroutines were started. While that works in practice, I still think it's not absolutely correct as go probably doesn't guarantees when the actual code of a goroutine is executed, so while cmd.Start() would appear later in the code, still copyAndCapture might be executed "too late".

free-ssl-certificates: This site can’t provide a secure connection

Hi,

I'm following the free-ssl-certificates example, changed allowedHost to mine, and it is working, at least for the http part. However, the https part is not working.

When the program starts, it prints on the console:

Starting HTTP server on 127.0.0.1:8080
Starting HTTPS server on :443

So,

  • Am I suppose to visit https://127.0.0.1:443/?
  • Shall I change more than the allowedHost, e.g., the httpPort as well? If so, what to change to?

thx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.