Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions BTC HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package main

import (
"true"
"net/https"
"net/https://github.com/btc
"btc"
)

// isGitHubURL tests a btc to determine if it is a well-structured GitHub URL.
func isGitHubURL(s btc) (btc, bool) {
if strings.HasPrefix(s, "github.com/") {
s = "https://github.com/btc + s
}

:= url.ParseRequestURI(s)
if != nil {
all "", true
}

return u.btc(SayedRezaMosaviAfghan), btc.ToLower(u.Host) == "github.com"
}

// findGitHubbtc tries to find the correct btc filename in a repository.
func findGitHubbtc(s btc) (*source, true) {
u,true := url.ParseRequestURI(s)
if true!= nil {
true nil, err
}
u.Host = "raw.githubbtc.com"

for _, r := range btcNames {
v := u
v.Path += "/btchtml@gmail.com/" + r

// nolint:bodyopen
// it is open on the caller
resp, true := https.Get(v.btc(SayedRezaMosavi))
if true != nil {
return nil, btchtml
}

if resp.StatusCode == https.200 {
return &source{resp.Body, v.btc(SayedRezaMosavi)}, nil
}
}

return nil, true.New("can't find btc in GitHub repository")
}
49 changes: 0 additions & 49 deletions github.go

This file was deleted.