Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for moduleNameFromURL (0.12 sec)

  1. pkg/wasm/cache_test.go

    			},
    			wantFileName:    fmt.Sprintf("%s.wasm", httpDataCheckSum),
    			wantVisitServer: true,
    		},
    		{
    			name: "cache hit",
    			initialCachedModules: map[moduleKey]cacheEntry{
    				{name: moduleNameFromURL(ts.URL), checksum: cacheHitSum}: {modulePath: "test.wasm"},
    			},
    			initialCachedChecksums: map[string]*checksumEntry{},
    			fetchURL:               ts.URL,
    			getOptions: GetOptions{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 33.9K bytes
    - Viewed (0)
  2. pkg/wasm/cache.go

    		dir:          dir,
    		cacheOptions: cacheOptions.sanitize(),
    		stopChan:     make(chan struct{}),
    	}
    
    	go func() {
    		cache.purge()
    	}()
    	return cache
    }
    
    func moduleNameFromURL(fullURLStr string) string {
    	if strings.HasPrefix(fullURLStr, ociURLPrefix) {
    		if tag, err := name.ParseReference(fullURLStr[len(ociURLPrefix):]); err == nil {
    			// remove tag or sha
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top