func main() {
router := gin.Default()
router.Static("/assets", "./assets")
router.StaticFS("/more_static", http.Dir("my_file_system"))
router.StaticFile("/favicon.ico", "./resources/favicon.ico")
router.StaticFileFS("/more_favicon.ico", "more_favicon.ico", http.Dir("my_file_system"))
// Listen and serve on 0.0.0.0:8080
router.Run(":8080")
}
$('#plus').click(function() {
let rowID = 12;
$("table tbody tr:first").clone().find("input").each(function(index) {
if(index === 0) {
$(this).attr('name', 'id['+rowID+']').val(rowID);
} else {
$(this).attr('name', 'id['+rowID+']').val('');
}
}).end().appendTo("table");
});
const request = $.get( "https://www.googleapis.com/youtube/v3/search?key=AIzaSyADqbsZvs7OK8aeDuAzW113EV191oiTaaI&channelId=UCjok1uTSBUgvRYQaASz6YWw&part=snippet,id&order=date&maxResults=1")|
request.error(function(_, textStatus, errorThrown) {
if (textStatus == 'timeout')
console.log('The server is not responding');
if (textStatus == 'error')
console.log(errorThrown);
});