Skip to content

Commit

Permalink
okay
Browse files Browse the repository at this point in the history
  • Loading branch information
saintmalik committed Jun 30, 2023
1 parent 4264822 commit f9c3a79
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 36 deletions.
8 changes: 0 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
module github.com/saintmalik/wame

go 1.16

require (
github.com/0xAX/notificator v0.0.0-20210731104411-c42e3d4a43ee // indirect
github.com/codegangsta/envy v0.0.0-20141216192214-4b78388c8ce4 // indirect
github.com/codegangsta/gin v0.0.0-20211113050330-71f90109db02 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
github.com/urfave/cli v1.22.5 // indirect
)
20 changes: 0 additions & 20 deletions go.sum

This file was deleted.

6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ func main() {

func walink(w http.ResponseWriter, r *http.Request){
if r.Method != "POST" {
http.Redirect(w, r, "/", http.StatusSeeOther )
http.Redirect(w, r, "/", http.StatusSeeOther )
return
}
countrycode := r.FormValue("cid")
phonenum := r.FormValue("numbs") // takes the value from the form

v := strings.Fields(``+phonenum+``) //split numbers into new lines

var WameNum []string //declared a global variable
Expand Down Expand Up @@ -79,7 +79,7 @@ d := struct {
Number [] string
}{
CountryMessage: inform,
Country: countrycode,
Country: countrycode,
Number: WameNum,
}
// a struct to hold the data and pass them to the template to be deisplayed
Expand Down
13 changes: 8 additions & 5 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.11.4/themes/ui-lightness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="public/css/main.css">
<title>WaMeir - Reach out to whatsapp users without saving numbers</title>
</head>
Expand All @@ -26,7 +27,9 @@ <h2 style="text-align: center;">WaMeir 😀👌</h2>
<textarea placeholder="Paste those numbers" rows="10" cols="50" name="numbs"></textarea>
<br/><br/>
<input type="submit">
</form>
</form>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.3/jquery-ui.js"></script>
</body>
</html>
Binary file renamed gin-bin → tmp/main
Binary file not shown.

0 comments on commit f9c3a79

Please sign in to comment.